Have stat print a mode in octal
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 3 May 2016 19:43:34 +0000 (15:43 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 3 May 2016 19:43:34 +0000 (15:43 -0400)
I can't stand octal.  We can remove it all once we start using ros/fs.h in
glibc.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/stat.c

index 84e3c8b..81abf06 100644 (file)
@@ -23,7 +23,7 @@ int main(int argc, char *argv[])
                printf("STAT RESULTS\n---------------------\n");
                printf("dev       : %d\n", st.st_dev);
                printf("ino       : %d\n", st.st_ino);
-               printf("mode      : %d\n", st.st_mode);
+               printf("mode      : %o(oct)\n", st.st_mode);
                printf("nlink     : %d\n", st.st_nlink);
                printf("uid       : %d\n", st.st_uid);
                printf("gid       : %d\n", st.st_gid);