diff options
| author | neilbrown <neilbrown> | 2003-08-04 04:25:54 +0000 |
|---|---|---|
| committer | neilbrown <neilbrown> | 2003-08-04 04:25:54 +0000 |
| commit | e09fbc8933961a0a774217ef32d73da373ddc670 (patch) | |
| tree | 4549a0208515316164325485ebb3cb583cd989ce /support | |
| parent | 18fc7a86a2a1213762cc4107565903127efadafc (diff) | |
| download | nfs-utils-e09fbc8933961a0a774217ef32d73da373ddc670.tar.gz nfs-utils-e09fbc8933961a0a774217ef32d73da373ddc670.tar.xz nfs-utils-e09fbc8933961a0a774217ef32d73da373ddc670.zip | |
/proc/fs/nfsd as an alternate to /proc/fs/nfsd
Diffstat (limited to 'support')
| -rw-r--r-- | support/export/xtab.c | 3 | ||||
| -rw-r--r-- | support/include/nfslib.h | 1 | ||||
| -rw-r--r-- | support/nfs/cacheio.c | 3 | ||||
| -rw-r--r-- | support/nfs/nfssvc.c | 4 |
4 files changed, 9 insertions, 2 deletions
diff --git a/support/export/xtab.c b/support/export/xtab.c index d9265a2..eb67b0d 100644 --- a/support/export/xtab.c +++ b/support/export/xtab.c @@ -65,6 +65,9 @@ xtab_mount_read(void) if ((fd=open(_PATH_PROC_EXPORTS, O_RDONLY))>=0) { close(fd); return xtab_read(_PATH_PROC_EXPORTS, 0); + } else if ((fd=open(_PATH_PROC_EXPORTS_ALT, O_RDONLY) >= 0)) { + close(fd); + return xtab_read(_PATH_PROC_EXPORTS_ALT, 0); } else return xtab_read(_PATH_XTAB, 2); } diff --git a/support/include/nfslib.h b/support/include/nfslib.h index c41f92e..e7e9f1d 100644 --- a/support/include/nfslib.h +++ b/support/include/nfslib.h @@ -43,6 +43,7 @@ #endif #ifndef _PATH_PROC_EXPORTS #define _PATH_PROC_EXPORTS "/proc/fs/nfs/exports" +#define _PATH_PROC_EXPORTS_ALT "/proc/fs/nfsd/exports" #endif enum cle_maptypes { diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c index ff5b028..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); } diff --git a/support/nfs/nfssvc.c b/support/nfs/nfssvc.c index dae16f7..67089be 100644 --- a/support/nfs/nfssvc.c +++ b/support/nfs/nfssvc.c @@ -19,7 +19,9 @@ nfssvc(int port, int nrservs) struct nfsctl_arg arg; int fd; - fd = open("/proc/fs/nfs/threads", O_WRONLY); + fd = open("/proc/fs/nfsd/threads", O_WRONLY); + if (fd < 0) + fd = open("/proc/fs/nfs/threads", O_WRONLY); if (fd >= 0) { /* 2.5+ kernel with nfsd filesystem mounted. * Just write the number in. |
