summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cwfs/config.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-12-07 06:30:26 +0100
committercinap_lenrek <cinap_lenrek@gmx.de>2012-12-07 06:30:26 +0100
commit52b500af6185068233ff021b2160463192f69ef0 (patch)
tree9b814505c911590988910f4af3273362b3e4d154 /sys/src/cmd/cwfs/config.c
parent3bf1e0798b9d002801d5af114052474f08aa1c64 (diff)
cwfs: make none attach work
allow attach as none. (this was supposed to work but it doesnt for 9p2000 because we have to check for afid being NOFID instead of checking the uname string). and add "nonone" flag to disable this.
Diffstat (limited to 'sys/src/cmd/cwfs/config.c')
-rw-r--r--sys/src/cmd/cwfs/config.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/src/cmd/cwfs/config.c b/sys/src/cmd/cwfs/config.c
index a9c87bb6c..bcb8b5e58 100644
--- a/sys/src/cmd/cwfs/config.c
+++ b/sys/src/cmd/cwfs/config.c
@@ -21,6 +21,7 @@ static Device* confdev;
static int copyworm = 0, copydev = 0;
static char *src, *dest;
+static int nononeset;
static int noauthset;
static int readonlyset;
static int resetparams;
@@ -432,6 +433,8 @@ mergeconf(Iobuf *p)
if(!noauthset)
noauth = 0;
+ if(!nononeset)
+ nonone = 0;
if(!noatimeset)
noatime = 0;
if(!readonlyset)
@@ -450,6 +453,9 @@ mergeconf(Iobuf *p)
} else if(strcmp(word, "noauth") == 0){
if(!noauthset)
noauth = 1;
+ } else if(strcmp(word, "nonone") == 0){
+ if(!nononeset)
+ nonone = 1;
} else if(strcmp(word, "noatime") == 0){
if(!noatimeset)
noatime = 1;
@@ -600,6 +606,8 @@ start:
fs->conf);
if(noauth)
cp = seprint(cp, ep, "noauth\n");
+ if(nonone)
+ cp = seprint(cp, ep, "nonone\n");
if(noatime)
cp = seprint(cp, ep, "noatime\n");
if(readonly)
@@ -1009,6 +1017,13 @@ arginit(void)
f.modconf = 1;
continue;
}
+ if(strcmp(word, "nonone") == 0) {
+ nonone = !nonone;
+ print("none %s\n", nonone ? "disabled" : "enabled");
+ nononeset++;
+ f.modconf = 1;
+ continue;
+ }
if(strcmp(word, "noatime") == 0) {
noatime = !noatime;
print("atime %s\n", noatime ? "disabled" : "enabled");