diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2013-05-30 14:18:31 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-30 20:59:12 +0100 |
commit | c8bfe84eef929e11f6d07e6631d5012a2a42f119 (patch) | |
tree | b0af1640c73905fdb901f0a6a66b5b397e56c647 /meta/recipes-devtools/makedevs | |
parent | 4844884d13fc8422f6cb088b92f160eaa8e4e1b9 (diff) | |
download | poky-c8bfe84eef929e11f6d07e6631d5012a2a42f119.tar.gz |
makedevs: Make the mode number readable in debug messages
(From OE-Core rev: 56f4adfc37d44e9626a5d157863f4b760bb516ec)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/makedevs')
-rw-r--r-- | meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c | 8 |
1 files changed, 4 insertions, 4 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 d58e8911a6..4cfb1d5cb8 100644 --- a/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c +++ b/meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c | |||
@@ -108,7 +108,7 @@ static void add_new_directory(char *name, char *path, | |||
108 | { | 108 | { |
109 | mkdir(path, mode); | 109 | mkdir(path, mode); |
110 | chown(path, uid, gid); | 110 | chown(path, uid, gid); |
111 | // printf("Directory: %s %s UID: %ld GID %ld MODE: %ld\n", path, name, uid, gid, mode); | 111 | // printf("Directory: %s %s UID: %ld GID %ld MODE: %04lo\n", path, name, uid, gid, mode); |
112 | } | 112 | } |
113 | 113 | ||
114 | static void add_new_device(char *name, char *path, unsigned long uid, | 114 | static void add_new_device(char *name, char *path, unsigned long uid, |
@@ -132,7 +132,7 @@ static void add_new_device(char *name, char *path, unsigned long uid, | |||
132 | 132 | ||
133 | mknod(path, 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: %04lo 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)); |
137 | } | 137 | } |
138 | 138 | ||
@@ -147,7 +147,7 @@ static void add_new_file(char *name, char *path, unsigned long uid, | |||
147 | } | 147 | } |
148 | chmod(path, mode); | 148 | chmod(path, mode); |
149 | chown(path, uid, gid); | 149 | chown(path, uid, gid); |
150 | // printf("File: %s %s UID: %ld GID: %ld MODE: %ld\n", | 150 | // printf("File: %s %s UID: %ld GID: %ld MODE: %04lo\n", |
151 | // path, name, gid, uid, mode); | 151 | // path, name, gid, uid, mode); |
152 | } | 152 | } |
153 | 153 | ||
@@ -158,7 +158,7 @@ static void add_new_fifo(char *name, char *path, unsigned long uid, | |||
158 | if (mknod(path, mode, 0)) | 158 | if (mknod(path, mode, 0)) |
159 | error_msg_and_die("%s: file can not be created with mknod!", path); | 159 | error_msg_and_die("%s: file can not be created with mknod!", path); |
160 | chown(path, uid, gid); | 160 | chown(path, uid, gid); |
161 | // printf("File: %s %s UID: %ld GID: %ld MODE: %ld\n", | 161 | // printf("File: %s %s UID: %ld GID: %ld MODE: %04lo\n", |
162 | // path, name, gid, uid, mode); | 162 | // path, name, gid, uid, mode); |
163 | } | 163 | } |
164 | 164 | ||