]>
Commit | Line | Data |
---|---|---|
42b01337 JR |
1 | # |
2 | # Make sure check_new_cache() is looking in the right place | |
3 | # | |
4 | --- src/support/nfs/cacheio.c.org 2003-08-04 00:12:16.000000000 -0400 | |
5 | +++ src/support/nfs/cacheio.c 2004-03-22 18:12:55.163534208 -0500 | |
6 | @@ -223,12 +223,23 @@ int readline(int fd, char **buf, int *le | |
7 | * This succeeds iff the "nfsd" filesystem is mounted on | |
8 | * /proc/fs/nfs | |
9 | */ | |
10 | +static char *cachelist[] = { | |
11 | + { "auth.unix.ip" }, { "nfsd.export" }, { "nfsd.fh" }, | |
12 | + { NULL, NULL } | |
13 | +}; | |
14 | int | |
15 | check_new_cache(void) | |
16 | { | |
17 | struct stat stb; | |
18 | - return (stat("/proc/fs/nfs/filehandle", &stb) == 0) || | |
19 | - (stat("/proc/fs/nfsd/filehandle", &stb) == 0); | |
20 | + char path[64]; | |
21 | + int i; | |
22 | + | |
23 | + for (i=0; cachelist[i]; i++ ){ | |
24 | + sprintf(path, "/proc/net/rpc/%s/channel", cachelist[i]); | |
25 | + if (stat(path, &stb) < 0) | |
26 | + return 0; | |
27 | + } | |
28 | + return 1; | |
29 | } | |
30 | ||
31 |