]> granicus.if.org Git - sysstat/commitdiff
Increase maximum fs name length to 128
authorSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 20 Mar 2015 16:10:16 +0000 (17:10 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 20 Mar 2015 16:10:16 +0000 (17:10 +0100)
Previous value was 72 and was considered a bit too small.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
rd_stats.c
rd_stats.h

index faa33cc1335395330ab4a0a6f036415f5f87be83..67fc244c6915d0a0b0e21e074ff09104931a7869 100644 (file)
@@ -2071,7 +2071,7 @@ void read_bus_usb_dev(struct stats_pwr_usb *st_pwr_usb, int nbr)
 void read_filesystem(struct stats_filesystem *st_filesystem, int nbr)
 {
        FILE *fp;
-       char line[256], fs_name[MAX_FS_LEN], mountp[128];
+       char line[256], fs_name[MAX_FS_LEN], mountp[MAX_FS_LEN];
        int fs = 0;
        struct stats_filesystem *st_filesystem_i;
        struct statvfs buf;
@@ -2083,7 +2083,7 @@ void read_filesystem(struct stats_filesystem *st_filesystem, int nbr)
                if (line[0] == '/') {
 
                        /* Read current filesystem name and mount point */
-                       sscanf(line, "%71s %127s", fs_name, mountp);
+                       sscanf(line, "%127s %127s", fs_name, mountp);
 
                        /* Replace octal codes */
                        oct2chr(mountp);
index c8248df15cca25beb648e59684a1cc816116da22..c7455549952f56dcb197da307b0cff615d653536 100644 (file)
@@ -26,7 +26,7 @@
 /* Maximum length of USB product string */
 #define MAX_PROD_LEN   48
 /* Maximum length of filesystem name */
-#define MAX_FS_LEN     72
+#define MAX_FS_LEN     128
 
 #define CNT_PART       1
 #define CNT_ALL_DEV    0