summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/include/9p.h1
-rw-r--r--sys/src/lib9p/file.c5
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/include/9p.h b/sys/include/9p.h
index 1a6dfd657..949476232 100644
--- a/sys/include/9p.h
+++ b/sys/include/9p.h
@@ -152,7 +152,6 @@ struct Tree {
/* below is implementation-specific; don't use */
Lock genlock;
ulong qidgen;
- ulong dirqidgen;
};
Tree* alloctree(char*, char*, ulong, void(*destroy)(File*));
diff --git a/sys/src/lib9p/file.c b/sys/src/lib9p/file.c
index b2e726cbf..eddef7e4c 100644
--- a/sys/src/lib9p/file.c
+++ b/sys/src/lib9p/file.c
@@ -337,8 +337,9 @@ alloctree(char *uid, char *gid, ulong mode, void (*destroy)(File*))
incref(f);
t->root = f;
- t->qidgen = 0;
- t->dirqidgen = 1;
+
+ /* t->qidgen starts at 1 because root Qid.path is 0 */
+ t->qidgen = 1;
if(destroy == nil)
destroy = nop;
t->destroy = destroy;