df: remove legacy code skipping "rootfs" monitoring
authorMarc Fournier <marc.fournier@camptocamp.com>
Mon, 18 Jan 2016 15:44:52 +0000 (16:44 +0100)
committerFlorian Forster <octo@collectd.org>
Fri, 22 Jan 2016 09:38:08 +0000 (10:38 +0100)
3512bb1 added code to skip duplicate reporting of `rootfs` mounted on `/`.
f9c1c5b and f0398d0 added generic code to skip any volume mounted twice.

Depending on the order of the entries in `/etc/mtab`, reporting for `/` was
entirely skipped.

This patch basically reverts the first, non-generic patch, as it's
superseded by the 2 others.

Fixes #1402

Signed-off-by: Florian Forster <octo@collectd.org>
src/df.c

index d99af4b..f3bc7e4 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -270,11 +270,7 @@ static int df_read (void)
                else
                {
                        if (strcmp (mnt_ptr->dir, "/") == 0)
-                       {
-                               if (strcmp (mnt_ptr->type, "rootfs") == 0)
-                                       continue;
                                sstrncpy (disk_name, "root", sizeof (disk_name));
-                       }
                        else
                        {
                                int i, len;