summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-04-18 23:02:36 +0200
committerraveit65 <[email protected]>2019-05-04 23:40:19 +0200
commit736ba510c9d5c55ca5a3a59693ce25fba010ad03 (patch)
treebc78c163ab66d293d8eb468fa17aa862e24dc419
parent68ff63c62dc8d791cfaa257683383d92fa38d026 (diff)
downloadmate-applets-736ba510c9d5c55ca5a3a59693ce25fba010ad03.tar.bz2
mate-applets-736ba510c9d5c55ca5a3a59693ce25fba010ad03.tar.xz
multiload: filter-out non-local disks and user mounts
Fix #171
-rw-r--r--multiload/linux-proc.c7
1 files changed, 4 insertions, 3 deletions
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)