Xymon Mailing List Archive search

Patch: rrd disk fix

2 messages in this thread

list Malcolm Hunter · Sat, 23 Jul 2011 13:47:42 +0000 ·
Hi,

This is a patch to fix a bug with parsing of disk data for RRD graphing. The original code assumed that if the drive letter was longer than one character, the system was actually a UNIX system. In fact, this column also holds the directory where volumes can be mounted - just like with UNIX systems. The patch removes this restriction - so it now only checks if there's a '/' at the start of the first column.

Regards,
Malcolm


Index: xymond/rrd/do_disk.c
===================================================================
--- xymond/rrd/do_disk.c        (revision 6701)
+++ xymond/rrd/do_disk.c        (working copy)
@@ -103,8 +103,7 @@
                 * So check if there's a slash in the NT filesystem letter - if yes,
                 * then it's really a Unix system after all.
                 */
-               if ( (dsystype == DT_NT) && (*(columns[5])) &&
-                    ((strchr(columns[0], '/')) || (strlen(columns[0]) > 1)) )
+               if ( (dsystype == DT_NT) && (*(columns[5])) && (strchr(columns[0], '/')) )
                        dsystype = DT_UNIX;

                switch (dsystype) {
list Henrik Størner · Sat, 30 Jul 2011 16:31:34 +0200 ·
quoted from Malcolm Hunter
On 23-07-2011 15:47, Malcolm Hunter wrote:
This is a patch to fix a bug with parsing of disk data for RRD graphing. The original code assumed that if the drive letter was longer than one character, the system was actually a UNIX system. In fact, this column also holds the directory where volumes can be mounted - just like with UNIX systems. The patch removes this restriction - so it now only checks if there's a '/' at the start of the first column.
Thanks, applied.


Regards,
Henrik