summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysdeps/linux/fsusage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/linux/fsusage.c b/sysdeps/linux/fsusage.c
index 13564948..b1867672 100644
--- a/sysdeps/linux/fsusage.c
+++ b/sysdeps/linux/fsusage.c
@@ -41,6 +41,10 @@ get_device(glibtop* server, const char *mountpoint,
while ((mnt = getmntent(fp)))
{
+ /* There can be multiple root mount entries, skip the unuseful one */
+ if (!strcmp(mnt->mnt_fsname, "rootfs"))
+ continue;
+
if (!strcmp(mountpoint, mnt->mnt_dir)) {
if (!strncmp(mnt->mnt_fsname, "/dev/", 5)) {
g_strlcpy(device, mnt->mnt_fsname + 5, device_size);