diff options
Diffstat (limited to 'lib9p/idl/2002-9P2000.9p')
-rw-r--r-- | lib9p/idl/2002-9P2000.9p | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib9p/idl/2002-9P2000.9p b/lib9p/idl/2002-9P2000.9p index 204b352..36a2427 100644 --- a/lib9p/idl/2002-9P2000.9p +++ b/lib9p/idl/2002-9P2000.9p @@ -22,11 +22,11 @@ version "9P2000" # tag - identify a request/response pair num tag = 2 - "NOTAG = ~0" + "NOTAG = u16_max" # file identifier - like a UNIX file-descriptor num fid = 4 - "NOFID = ~0" + "NOFID = u32_max" # string - u16le `n`, then `n` bytes of UTF-8, without any nul-bytes struct s = "len[2] len*(utf8[1])" @@ -56,7 +56,7 @@ bitfield dm = 4 "bit 1=OTHER_W" "bit 0=OTHER_X" - "alias PERM_MASK=0777" # {OWNER,GROUP,OTHER}_{R,W,X} + "mask PERM=0777" # {OWNER,GROUP,OTHER}_{R,W,X} # QID Type - see `struct qid` below bitfield qt = 1 @@ -107,8 +107,8 @@ struct stat = "stat_size[2,val=end-&kern_type]" # "O"pen flags (flags to pass to Topen and Tcreate) # Unused bits *must* be 0. bitfield o = 1 - "bit 0=subfield(mode)" # low bit of the 2-bit READ/WRITE/RDWR/EXEC enum - "bit 1=subfield(mode)" # high bit of the 2-bit READ/WRITE/RDWR/EXEC enum + "bit 0=num(MODE)" # low bit of the 2-bit READ/WRITE/RDWR/EXEC enum + "bit 1=num(MODE)" # high bit of the 2-bit READ/WRITE/RDWR/EXEC enum #"bit 2=unused" #"bit 3=unused" "bit 4=TRUNC" @@ -116,13 +116,12 @@ bitfield o = 1 "bit 6=RCLOSE" # remove-on-close #"bit 7=unused" - "alias READ = 0" # make available for this FID: Tread() - "alias WRITE = 1" # make available for this FID: Twrite() - "alias RDWR = 2" # make available for this FID: Tread() and Twrite() - "alias EXEC = 3" # make available for this FID: Tread() + "num(MODE) READ = 0" # make available for this FID: Tread() + "num(MODE) WRITE = 1" # make available for this FID: Twrite() + "num(MODE) RDWR = 2" # make available for this FID: Tread() and Twrite() + "num(MODE) EXEC = 3" # make available for this FID: Tread() - "alias MODE_MASK = 0b00000011" - "alias FLAG_MASK = 0b11111100" + "mask FLAG = 0b11111100" # A 9P2000 session goes: # |