Blob Blame History Raw
diff -up sysstat-8.0.4/common.c.pom sysstat-8.0.4/common.c
--- sysstat-8.0.4/common.c.pom	2009-12-11 11:42:00.000000000 +0100
+++ sysstat-8.0.4/common.c	2009-12-11 11:44:28.000000000 +0100
@@ -413,7 +413,6 @@ int get_nfs_mount_nr(void)
 {
    FILE *fp;
    char line[8192];
-   char type_name[10];
    unsigned int nfs = 0;
 
    if ((fp = fopen(NFSMOUNTSTATS, "r")) == NULL)
@@ -422,13 +421,10 @@ int get_nfs_mount_nr(void)
 
    while (fgets(line, 8192, fp) != NULL) {
 
-      if ((strstr(line, "mounted")) && (strstr(line, "on")) && (strstr(line, "with")) &&
-	  (strstr(line, "fstype"))) {
-	
-	 sscanf(strstr(line, "fstype") + 6, "%10s", type_name);
-	 if ((!strncmp(type_name, "nfs", 3)) && (strncmp(type_name, "nfsd", 4))) {
-	    nfs ++;
-	 }
+      if ((strstr(line, "mounted")) && (strstr(line, "on")) &&
+	 (strstr(line, "with fstype nfs")) &&
+	 !(strstr(line, "with fstype nfsd"))) {
+		nfs++;
       }
    }