don't report inodes if fs doesn't provide f_files and f_ffree
[collectd.git] / src / df.c
index ae09e6b..3b0c995 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;