diff options
author | rbuj <[email protected]> | 2019-04-18 23:02:36 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-05-04 23:40:19 +0200 |
commit | 736ba510c9d5c55ca5a3a59693ce25fba010ad03 (patch) | |
tree | bc78c163ab66d293d8eb468fa17aa862e24dc419 /multiload | |
parent | 68ff63c62dc8d791cfaa257683383d92fa38d026 (diff) | |
download | mate-applets-736ba510c9d5c55ca5a3a59693ce25fba010ad03.tar.bz2 mate-applets-736ba510c9d5c55ca5a3a59693ce25fba010ad03.tar.xz |
multiload: filter-out non-local disks and user mounts
Fix #171
Diffstat (limited to 'multiload')
-rw-r--r-- | multiload/linux-proc.c | 7 |
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) |