summaryrefslogtreecommitdiff
path: root/lib9p/9P2000.txt
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-02 21:09:07 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-02 21:09:07 -0600
commit4b8a9d80d37c892695f102a48898fe1beacb593c (patch)
treea8e56c0b91201897f0966256b3b7b1e039d647a6 /lib9p/9P2000.txt
parentba8f3ddba03ab93158c93f77ef98137e1dd6e8e9 (diff)
lib9p: Add the DM bitfield
Diffstat (limited to 'lib9p/9P2000.txt')
-rw-r--r--lib9p/9P2000.txt37
1 files changed, 28 insertions, 9 deletions
diff --git a/lib9p/9P2000.txt b/lib9p/9P2000.txt
index da9b223..3fb9e51 100644
--- a/lib9p/9P2000.txt
+++ b/lib9p/9P2000.txt
@@ -30,18 +30,37 @@ d = "len[4] len*(dat[1])"
# string (u16le `n`, then `n` bytes of UTF-8)
s = "len[2] len*(utf8[1])"
+# "d"? mode - (file permissions and attributes)
+bitfield dm 32
+ 31/DIR
+ 30/APPEND
+ 29/EXCL
+ # DMMOUNT has been around in Plan 9 forever, but is
+ # undocumented, and is explicitly excluded from the 9P2000
+ # draft RFC. As I understand it, DMMOUNT indicates that the
+ # file is mounted by the kernel as a 9P transport; that the
+ # kernel has a lock on doing I/O on it, so userspace can't do
+ # I/O on it.
+ 28/_PLAN9_MOUNT
+ 27/AUTH
+ 26/TMP
+ #...
+ 8/OWNER_R
+ 7/OWNER_W
+ 6/OWNER_X
+ 5/GROUP_R
+ 4/GROUP_W
+ 3/GROUP_X
+ 2/OTHER_R
+ 1/OTHER_W
+ 0/OTHER_X
+
# QID Type (see qid below)
bitfield qt 8
7/DIR
6/APPEND
5/EXCL
- # QTMOUNT has been around in Plan 9 forever, but is
- # undocumented, and is explicitly excluded from the 9P2000
- # draft RFC. As I understand it, QTMOUNT indicates that the
- # file is mounted by the kernel as a 9P transport; that the
- # kernel has a lock on doing I/O on it, so userspace can't do
- # I/O on it.
- 4/_PLAN9_MOUNT
+ 4/_PLAN9_MOUNT # see DMMOUNT above
3/AUTH
# Fun historical fact: QTTMP was a relatively late addition to
# Plan 9, in 2003-12.
@@ -73,7 +92,7 @@ stat = "stat_size[2]"
"kern_type[2]"
"kern_dev[4]"
"file_qid[qid]"
- "file_mode[4]"
+ "file_mode[dm]"
"file_atime[4]"
"file_mtime[4]"
"file_size[8]"
@@ -117,7 +136,7 @@ bitfield o 8
111/Rwalk = "nwqid[2] nwqid*(wqid[qid])"
112/Topen = "fid[4] mode[o]"
113/Ropen = "qid[qid] iounit[4]"
-114/Tcreate = "fid[4] name[s] perm[4] mode[o]"
+114/Tcreate = "fid[4] name[s] perm[dm] mode[o]"
115/Rcreate = "qid[qid] iounit[4]"
116/Tread = "fid[4] offset[8] count[4]"
117/Rread = "data[d]" # for directories data is the sequence "cnt*(entries[stat])"