fossil does not report the qid.type bits as it should in Rwalk and Ropen. It does on Rstat. This makes it report the qid.type bits also in Rwalk and Ropen. Reference: /n/sources/patch/applied/fossil-qid-type-bits Date: Fri May 17 17:17:24 CES 2013 Signed-off-by: nemo@lsub.org --- /sys/src/cmd/fossil/9p.c Fri May 17 17:14:59 2013 +++ /sys/src/cmd/fossil/9p.c Fri May 17 17:14:54 2013 @@ -867,6 +867,12 @@ qid.type = QTFILE; if(fileIsDir(file)) qid.type = QTDIR; + if(fileIsAppend(file)) + qid.type |= QTAPPEND; + if(fileIsTemporary(file)) + qid.type |= QTTMP; + if(fileIsExclusive(file)) + qid.type |= QTEXCL; qid.vers = fileGetMcount(file); qid.path = fileGetId(file); r->wqid[r->nwqid++] = qid; --- /sys/src/cmd/fossil/file.c Fri May 17 17:15:09 2013 +++ /sys/src/cmd/fossil/file.c Fri May 17 17:15:03 2013 @@ -961,6 +961,24 @@ } int +fileIsAppend(File *f) +{ + return (f->dir.mode & ModeAppend) != 0; +} + +int +fileIsExclusive(File *f) +{ + return (f->dir.mode & ModeExclusive) != 0; +} + +int +fileIsTemporary(File *f) +{ + return (f->dir.mode & ModeTemporary) != 0; +} + +int fileIsRoot(File *f) { return f == f->fs->file; --- /sys/src/cmd/fossil/fs.h Fri May 17 17:15:17 2013 +++ /sys/src/cmd/fossil/fs.h Fri May 17 17:15:13 2013 @@ -45,6 +45,9 @@ int fileGetSize(File*, uvlong*); File *fileIncRef(File*); int fileIsDir(File*); +int fileIsTemporary(File*); +int fileIsAppend(File*); +int fileIsExclusive(File*); int fileIsRoFs(File*); int fileIsRoot(File*); int fileMapBlock(File*, ulong, uchar[VtScoreSize], ulong);