remove factotum directory

This commit is contained in:
rsc 2005-02-11 19:45:55 +00:00
parent 783aadbdcd
commit 49f498ae11
3 changed files with 14 additions and 2 deletions

View file

@ -221,5 +221,7 @@ extern int xiowrite(int, void*, int);
extern int xioasrdresp(int, void*, int); extern int xioasrdresp(int, void*, int);
extern int xioasgetticket(int, char*, char*); extern int xioasgetticket(int, char*, char*);
extern int extrafactotumdir;
int havesecstore(void); int havesecstore(void);
int secstorefetch(void); int secstorefetch(void);

View file

@ -15,6 +15,8 @@ enum
Qconv, Qconv,
}; };
static int qtop;
Qid Qid
mkqid(int type, int path) mkqid(int type, int path)
{ {
@ -106,7 +108,7 @@ fswalk1(Fid *fid, char *name, Qid *qid)
return nil; return nil;
} }
if(strcmp(name, "..") == 0){ if(strcmp(name, "..") == 0){
*qid = mkqid(QTDIR, Qroot); *qid = mkqid(QTDIR, qtop);
fid->qid = *qid; fid->qid = *qid;
return nil; return nil;
} }
@ -482,7 +484,7 @@ fsproc(void *v)
static void static void
fsattach(Req *r) fsattach(Req *r)
{ {
r->fid->qid = mkqid(QTDIR, Qroot); r->fid->qid = mkqid(QTDIR, qtop);
r->ofcall.qid = r->fid->qid; r->ofcall.qid = r->fid->qid;
respond(r, nil); respond(r, nil);
} }
@ -505,6 +507,10 @@ fsstart(Srv *s)
{ {
USED(s); USED(s);
if(extrafactotumdir)
qtop = Qroot;
else
qtop = Qfactotum;
creq = chancreate(sizeof(Req*), 0); creq = chancreate(sizeof(Req*), 0);
cfid = chancreate(sizeof(Fid*), 0); cfid = chancreate(sizeof(Fid*), 0);
cfidr = chancreate(sizeof(Fid*), 0); cfidr = chancreate(sizeof(Fid*), 0);

View file

@ -1,6 +1,7 @@
#include "std.h" #include "std.h"
#include "dat.h" #include "dat.h"
int extrafactotumdir;
int debug; int debug;
int trysecstore = 1; int trysecstore = 1;
char *factname = "factotum"; char *factname = "factotum";
@ -57,6 +58,9 @@ threadmain(int argc, char *argv[])
case 'n': case 'n':
trysecstore = 0; trysecstore = 0;
break; break;
case 'x':
extrafactotumdir = 1;
break;
}ARGEND }ARGEND
if(argc != 0) if(argc != 0)