mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 04:17:33 +00:00
Fix regression in get_diskio() (used to ignore valid disks)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@216 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
ad781663f6
commit
67a9e3b5e5
@ -1209,12 +1209,12 @@ void update_diskio()
|
|||||||
fgets(buf, 512, fp);
|
fgets(buf, 512, fp);
|
||||||
col_count = sscanf(buf, "%u %u %*s %*u %*u %u %*u %*u %*u %u",
|
col_count = sscanf(buf, "%u %u %*s %*u %*u %u %*u %*u %*u %u",
|
||||||
&major, &minor, &reads, &writes);
|
&major, &minor, &reads, &writes);
|
||||||
/* ignore subdevices (they have only 7 entries in their line)
|
/* ignore subdevices (they have only 3 matching entries in their line)
|
||||||
* and virtual devices (LVM, network block devices, RAM disks, Loopback)
|
* and virtual devices (LVM, network block devices, RAM disks, Loopback)
|
||||||
*
|
*
|
||||||
* XXX ignore devices which are part of a SW RAID (MD_MAJOR)
|
* XXX ignore devices which are part of a SW RAID (MD_MAJOR)
|
||||||
*/
|
*/
|
||||||
if (col_count > 7 &&
|
if (col_count > 3 &&
|
||||||
major != LVM_BLK_MAJOR && major != NBD_MAJOR &&
|
major != LVM_BLK_MAJOR && major != NBD_MAJOR &&
|
||||||
major != RAMDISK_MAJOR && major != LOOP_MAJOR) {
|
major != RAMDISK_MAJOR && major != LOOP_MAJOR) {
|
||||||
current += reads + writes;
|
current += reads + writes;
|
||||||
|
Loading…
Reference in New Issue
Block a user