summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/makedevs
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2013-05-30 14:18:31 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-30 20:57:47 +0100
commit56f4adfc37d44e9626a5d157863f4b760bb516ec (patch)
treec1a2b9b4bb09c82c4a89b93f36f1a7f653791c28 /meta/recipes-devtools/makedevs
parent0a878426bee607a7d961ba475a7ec7e89115df35 (diff)
downloadopenembedded-core-56f4adfc37d44e9626a5d157863f4b760bb516ec.tar.gz
openembedded-core-56f4adfc37d44e9626a5d157863f4b760bb516ec.tar.bz2
openembedded-core-56f4adfc37d44e9626a5d157863f4b760bb516ec.zip
makedevs: Make the mode number readable in debug messages
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.c8
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,
{
mkdir(path, mode);
chown(path, uid, gid);
-// printf("Directory: %s %s UID: %ld GID %ld MODE: %ld\n", path, name, uid, gid, mode);
+// printf("Directory: %s %s UID: %ld GID %ld MODE: %04lo\n", path, name, uid, gid, mode);
}
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,
mknod(path, mode, rdev);
chown(path, uid, gid);
-// printf("Device: %s %s UID: %ld GID: %ld MODE: %ld MAJOR: %d MINOR: %d\n",
+// printf("Device: %s %s UID: %ld GID: %ld MODE: %04lo MAJOR: %d MINOR: %d\n",
// path, name, uid, gid, mode, (short)(rdev >> 8), (short)(rdev & 0xff));
}
@@ -147,7 +147,7 @@ static void add_new_file(char *name, char *path, unsigned long uid,
}
chmod(path, mode);
chown(path, uid, gid);
-// printf("File: %s %s UID: %ld GID: %ld MODE: %ld\n",
+// printf("File: %s %s UID: %ld GID: %ld MODE: %04lo\n",
// path, name, gid, uid, mode);
}
@@ -158,7 +158,7 @@ static void add_new_fifo(char *name, char *path, unsigned long uid,
if (mknod(path, mode, 0))
error_msg_and_die("%s: file can not be created with mknod!", path);
chown(path, uid, gid);
-// printf("File: %s %s UID: %ld GID: %ld MODE: %ld\n",
+// printf("File: %s %s UID: %ld GID: %ld MODE: %04lo\n",
// path, name, gid, uid, mode);
}