summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-02-14 20:35:36 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-02-14 20:35:36 +0100
commitb19280009679f31bd3cf05a9a7df95ef121cef0b (patch)
tree18e9d9ba420819d13125a09a9da568511c36a807 /sys/src
parentdf6a30f3c0e2be41161101db0d62f5c02d93bbc0 (diff)
ftpfs: no caching by default, add -c flag to enable it (patch by mycroftiv)
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/cmd/ip/ftpfs/ftpfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/src/cmd/ip/ftpfs/ftpfs.c b/sys/src/cmd/ip/ftpfs/ftpfs.c
index b67dde99e..e254284c4 100644
--- a/sys/src/cmd/ip/ftpfs/ftpfs.c
+++ b/sys/src/cmd/ip/ftpfs/ftpfs.c
@@ -85,6 +85,7 @@ char *nouid = "?uid?";
char *nosuchfile = "file does not exist";
char *keyspec = "";
+int docache = 0;
void
usage(void)
@@ -149,6 +150,9 @@ main(int argc, char *argv[])
case 'q':
quiet = 1;
break;
+ case 'c':
+ docache = 1;
+ break;
} ARGEND
if(argc != 1)
usage();
@@ -582,6 +586,8 @@ rclunk(Fid *f)
f->node->opens--;
}
f->busy = 0;
+ if(!docache && ISCACHED(f->node))
+ uncache(f->node);
return 0;
}