Code

don't report inodes if fs doesn't provide f_files and f_ffree
authorMarek Becka <marek.becka@superhosting.cz>
Wed, 24 Jun 2015 15:39:55 +0000 (11:39 -0400)
committerFlorian Forster <octo@collectd.org>
Thu, 25 Jun 2015 20:31:30 +0000 (22:31 +0200)
src/df.c

index ae09e6b7cfee834d69de231dda572993f056873e..3b0c995b2f0fed286f47d8d80e94b10fe75dd828 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -321,7 +321,7 @@ static int df_read (void)
                }
 
                /* inode handling */
-               if (report_inodes)
+               if (report_inodes && statbuf.f_files != 0 && statbuf.f_ffree != 0)
                {
                        uint64_t inode_free;
                        uint64_t inode_reserved;