diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c index c7ad722f2e..247d6c1c3c 100644 --- a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c +++ b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c | |||
@@ -130,7 +130,7 @@ static void add_new_device(char *name, char *path, unsigned long uid, | |||
130 | timestamp = sb.st_mtime; | 130 | timestamp = sb.st_mtime; |
131 | } | 131 | } |
132 | 132 | ||
133 | mknod(name, mode, rdev); | 133 | mknod(path, mode, rdev); |
134 | chown(path, uid, gid); | 134 | chown(path, uid, gid); |
135 | // printf("Device: %s %s UID: %ld GID: %ld MODE: %ld MAJOR: %d MINOR: %d\n", | 135 | // printf("Device: %s %s UID: %ld GID: %ld MODE: %ld MAJOR: %d MINOR: %d\n", |
136 | // path, name, uid, gid, mode, (short)(rdev >> 8), (short)(rdev & 0xff)); | 136 | // path, name, uid, gid, mode, (short)(rdev >> 8), (short)(rdev & 0xff)); |
@@ -198,7 +198,7 @@ static int interpret_table_entry(char *line) | |||
198 | error_msg_and_die("Device table entries require absolute paths"); | 198 | error_msg_and_die("Device table entries require absolute paths"); |
199 | } | 199 | } |
200 | name = xstrdup(path + 1); | 200 | name = xstrdup(path + 1); |
201 | sprintf(path, "%s/%s\0", rootdir, name); | 201 | sprintf(path, "%s/%s", rootdir, name); |
202 | 202 | ||
203 | switch (type) { | 203 | switch (type) { |
204 | case 'd': | 204 | case 'd': |
@@ -223,6 +223,7 @@ static int interpret_table_entry(char *line) | |||
223 | 223 | ||
224 | for (i = start; i < count; i++) { | 224 | for (i = start; i < count; i++) { |
225 | sprintf(buf, "%s%d", name, i); | 225 | sprintf(buf, "%s%d", name, i); |
226 | sprintf(path, "%s/%s%d", rootdir, name, i); | ||
226 | /* FIXME: MKDEV uses illicit insider knowledge of kernel | 227 | /* FIXME: MKDEV uses illicit insider knowledge of kernel |
227 | * major/minor representation... */ | 228 | * major/minor representation... */ |
228 | rdev = MKDEV(major, minor + (i * increment - start)); | 229 | rdev = MKDEV(major, minor + (i * increment - start)); |