summaryrefslogtreecommitdiff
path: root/sys/src/cmd/exportfs
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2022-10-22 18:40:21 +0000
committerMichael Forney <mforney@mforney.org>2022-10-22 18:40:21 +0000
commit6d9b3408d945fc9645c27b42db0a9918752324fd (patch)
treeb3c00274b3f2bc6fa600e2c378296f01c0a34294 /sys/src/cmd/exportfs
parent585365f5bbffae93eac3f1a4ba476aa0cab3f95d (diff)
exportfs: fix clunk of first attach with -S
0 is a valid mid so should not be used as a nil value, since then the first mount (mid=0) will never be unmounted.
Diffstat (limited to 'sys/src/cmd/exportfs')
-rw-r--r--sys/src/cmd/exportfs/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/cmd/exportfs/io.c b/sys/src/cmd/exportfs/io.c
index 2309168a8..75852035d 100644
--- a/sys/src/cmd/exportfs/io.c
+++ b/sys/src/cmd/exportfs/io.c
@@ -119,7 +119,7 @@ freefid(int nr)
l = &fidhash(nr);
for(f = *l; f != nil; f = f->next) {
if(f->nr == nr) {
- if(f->mid) {
+ if(f->mid != -1) {
snprint(buf, sizeof(buf), "/mnt/exportfs/%d", f->mid);
unmount(0, buf);
psmap[f->mid] = 0;
@@ -171,7 +171,7 @@ newfid(int nr)
*l = new;
new->nr = nr;
new->fid = -1;
- new->mid = 0;
+ new->mid = -1;
return new;
}