X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=support%2Fnfs%2Fcacheio.c;h=ff5b02813e256c12b017da5356d80ecb17b9c43c;hb=bce6f6871f481087890674497b4b2154dc4825fc;hp=77facb1eaccc7158dedef07f08db8c0bef448017;hpb=2d33968c66860ad772aac918992986fe4865b3a4;p=nfs-utils.git diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c index 77facb1..ff5b028 100644 --- a/support/nfs/cacheio.c +++ b/support/nfs/cacheio.c @@ -260,7 +260,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); }