walters / rpms / nfs-utils

Forked from rpms/nfs-utils 6 years ago
Clone
bbc1dcf
commit d03090be4f440d70328988e9f792f3bd0ebd956b
bbc1dcf
Author: Neil Brown <neilb@suse.de>
bbc1dcf
Date:   Fri Jun 6 15:17:55 2008 -0400
bbc1dcf
bbc1dcf
    nfsstat -m lists all current nfs mounts, with the mount options.
bbc1dcf
    It does this by reading /proc/mounts and looking for mounts of type
bbc1dcf
    "nfs".  It really should check for "nfs4" as well.
bbc1dcf
    
bbc1dcf
    For simplicity, just check the first 3 characters of the type.
bbc1dcf
    
bbc1dcf
    Signed-off-by: NeilBrown <neilb@suse.de>
bbc1dcf
    Signed-off-by: Steve Dickson <steved@redhat.com>
bbc1dcf
bbc1dcf
diff --git a/utils/nfsstat/nfsstat.c b/utils/nfsstat/nfsstat.c
bbc1dcf
index aa6c961..d2cca8d 100644
bbc1dcf
--- a/utils/nfsstat/nfsstat.c
bbc1dcf
+++ b/utils/nfsstat/nfsstat.c
bbc1dcf
@@ -716,7 +716,7 @@ mounts(const char *name)
bbc1dcf
 		if (!(type = strtok(NULL, " \t")))
bbc1dcf
 			continue;
bbc1dcf
 
bbc1dcf
-		if (strcmp(type, "nfs")) {
bbc1dcf
+		if (strcmp(type, "nfs") && strcmp(type,"nfs4")) {
bbc1dcf
 		    continue;
bbc1dcf
 		}
bbc1dcf