summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-04-18 23:02:36 +0200
committerraveit65 <[email protected]>2019-05-04 23:43:06 +0200
commit6b57a5b6c4ed159be8567d71ce8e302bf04b495f (patch)
tree53ef320399cf528e714583e5b76ecc35d342cace
parent86f75af1b735af8bc779dc564cd31e99a08e53c7 (diff)
downloadmate-applets-6b57a5b6c4ed159be8567d71ce8e302bf04b495f.tar.bz2
mate-applets-6b57a5b6c4ed159be8567d71ce8e302bf04b495f.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)