disk plugin: Use correct name under Linux 2.4
[collectd.git] / src / disk.c
index 8feaa8d..e7372ab 100644 (file)
@@ -403,7 +403,7 @@ static int disk_read (void)
                major = atoll (fields[0]);
                minor = atoll (fields[1]);
 
-               disk_name = fields[2];
+               disk_name = fields[2 + fieldshift];
 
                for (ds = disklist, pre_ds = disklist; ds != NULL; pre_ds = ds, ds = ds->next)
                        if (strcmp (disk_name, ds->name) == 0)