X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmountd%2Fcache.c;h=96492b8f5b467ec55ddc408eeb798339a8ce47f0;hp=2e35b17417173914899234d4cfe28f6ff9aa42a4;hb=refs%2Ftags%2Fnfs-utils-1-0-5-post2;hpb=18fc7a86a2a1213762cc4107565903127efadafc diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c index 2e35b17..96492b8 100644 --- a/utils/mountd/cache.c +++ b/utils/mountd/cache.c @@ -368,15 +368,18 @@ void cache_export(nfs_export *exp) * { * echo $domain $path $length * read filehandle <&0 - * } <> /proc/fs/nfs/filehandle + * } <> /proc/fs/nfsd/filehandle */ struct nfs_fh_len * cache_get_filehandle(nfs_export *exp, int len, char *p) { - FILE *f = fopen("/proc/fs/nfs/filehandle", "r+"); + FILE *f = fopen("/proc/fs/nfsd/filehandle", "r+"); char buf[200]; char *bp = buf; static struct nfs_fh_len fh; + + if (!f) + f = fopen("/proc/fs/nfs/filehandle", "r+"); if (!f) return NULL;