Provide a more useful devpermcheck error
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 21 Sep 2015 22:48:02 +0000 (18:48 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 28 Sep 2015 19:14:00 +0000 (15:14 -0400)
Perms and rwxes are easier to read in octal.

kern/src/ns/dev.c

index 4f6b013..604c65f 100644 (file)
@@ -361,7 +361,7 @@ void devpermcheck(char *fileuid, uint32_t perm, int omode)
         * seem to handle O_EXEC being mixed readable or writable. */
        rwx = omode_to_rwx(omode);
        if ((rwx & perm) != rwx)
-               error("%s: devpermcheck(%s,0x%x,0x%x) failed", Eperm, fileuid, perm,
+               error("%s: devpermcheck(%s, 0%o, 0%o) failed", Eperm, fileuid, perm,
                          omode);
 }