]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/nfs/cacheio.c
/proc/fs/nfsd as an alternate to /proc/fs/nfsd
[nfs-utils.git] / support / nfs / cacheio.c
index 77facb1eaccc7158dedef07f08db8c0bef448017..20d195c16ca4b792fbb7b7866688e7993ab87db8 100644 (file)
@@ -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);
                }