aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/factotum/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/factotum/fs.c')
-rw-r--r--src/cmd/factotum/fs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cmd/factotum/fs.c b/src/cmd/factotum/fs.c
index 1d801b42..f9ad785b 100644
--- a/src/cmd/factotum/fs.c
+++ b/src/cmd/factotum/fs.c
@@ -15,6 +15,8 @@ enum
Qconv,
};
+static int qtop;
+
Qid
mkqid(int type, int path)
{
@@ -106,7 +108,7 @@ fswalk1(Fid *fid, char *name, Qid *qid)
return nil;
}
if(strcmp(name, "..") == 0){
- *qid = mkqid(QTDIR, Qroot);
+ *qid = mkqid(QTDIR, qtop);
fid->qid = *qid;
return nil;
}
@@ -482,7 +484,7 @@ fsproc(void *v)
static void
fsattach(Req *r)
{
- r->fid->qid = mkqid(QTDIR, Qroot);
+ r->fid->qid = mkqid(QTDIR, qtop);
r->ofcall.qid = r->fid->qid;
respond(r, nil);
}
@@ -505,6 +507,10 @@ fsstart(Srv *s)
{
USED(s);
+ if(extrafactotumdir)
+ qtop = Qroot;
+ else
+ qtop = Qfactotum;
creq = chancreate(sizeof(Req*), 0);
cfid = chancreate(sizeof(Fid*), 0);
cfidr = chancreate(sizeof(Fid*), 0);