From 736ba510c9d5c55ca5a3a59693ce25fba010ad03 Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 18 Apr 2019 23:02:36 +0200 Subject: multiload: filter-out non-local disks and user mounts Fix #171 --- multiload/linux-proc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'multiload') diff --git a/multiload/linux-proc.c b/multiload/linux-proc.c index fcd48bff..c661dd8f 100644 --- a/multiload/linux-proc.c +++ b/multiload/linux-proc.c @@ -123,9 +123,10 @@ GetDiskLoad (int Maximum, int data [3], LoadGraph *g) struct statvfs statresult; glibtop_fsusage fsusage; - if (strcmp(mountentries[i].type, "smbfs") == 0 - || strcmp(mountentries[i].type, "nfs") == 0 - || strcmp(mountentries[i].type, "cifs") == 0) + if (strstr (mountentries[i].devname, "/dev/") == NULL) + continue; + + if (strstr (mountentries[i].mountdir, "/media/") != NULL) continue; if (statvfs (mountentries[i].mountdir, &statresult) < 0) -- cgit v1.2.1