]> code.ossystems Code Review - openembedded-core.git/commitdiff
makedevs: Make the mode number readable in debug messages
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Thu, 30 May 2013 12:18:31 +0000 (14:18 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 May 2013 19:57:47 +0000 (20:57 +0100)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/makedevs/makedevs-1.0.0/makedevs.c

index d58e8911a6674ec657033621a910de916ab8e124..4cfb1d5cb844503b8e5a46a6f79811684f3039ca 100644 (file)
@@ -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);
 }