Properly convert open mode flags to rwx [3/7]
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 3 Sep 2015 22:32:03 +0000 (18:32 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 28 Sep 2015 19:14:00 +0000 (15:14 -0400)
commit914578baf1c13c327b76b4eebf08f34902bebf01
treec36413dab666a749c4c5f133842b20b08993baf6
parent1c81aef1329a8ebba529521d0e29f0a059ccb4a9
Properly convert open mode flags to rwx [3/7]

Plan 9's devpermcheck hard-coded the fact that O_RDONLY was 0 into its
"access" array.  It also didn't seem to deal with O_EXEC being OR-ed
into the flags, such that you could only have an 'x', not anything else.

The helper for this conversion is also useful in the VFS.
kern/include/ns.h
kern/src/ns/dev.c
kern/src/ns/util.c
kern/src/vfs.c