X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=support%2Fnfs%2Fcacheio.c;h=20d195c16ca4b792fbb7b7866688e7993ab87db8;hb=e7c106f6008ab11558e595585fb72872b21ae624;hp=77facb1eaccc7158dedef07f08db8c0bef448017;hpb=2d33968c66860ad772aac918992986fe4865b3a4;p=nfs-utils.git diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c index 77facb1..20d195c 100644 --- a/support/nfs/cacheio.c +++ b/support/nfs/cacheio.c @@ -227,7 +227,8 @@ int check_new_cache(void) { struct stat stb; - return (stat("/proc/fs/nfs/filehandle", &stb) == 0); + return (stat("/proc/fs/nfs/filehandle", &stb) == 0) || + (stat("/proc/fs/nfsd/filehandle", &stb) == 0); } @@ -260,7 +261,7 @@ cache_flush(int force) int fd; sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]); fd = open(path, O_RDWR); - if (fd) { + if (fd >= 0) { write(fd, stime, strlen(stime)); close(fd); }