[PATCH] nfs-utils: "nfsstat -m" should report nfsv4 mounts too.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



nfsstat -m lists all current nfs mounts, with the mount options.
It does this by reading /proc/mounts and looking for mounts of type
"nfs".
It really should check for "nfs4" as well.  For simplicity, just check
the first 3 characters of the type.

Signed-off-by: NeilBrown <neilb@xxxxxxx>

diff --git a/utils/nfsstat/nfsstat.c b/utils/nfsstat/nfsstat.c
index aa6c961..488c845 100644
--- a/utils/nfsstat/nfsstat.c
+++ b/utils/nfsstat/nfsstat.c
@@ -716,7 +716,7 @@ mounts(const char *name)
 		if (!(type = strtok(NULL, " \t")))
 			continue;
 
-		if (strcmp(type, "nfs")) {
+		if (strncmp(type, "nfs", 3)) {
 		    continue;
 		}
 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux