X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdf.c;h=4b3cba019cea9219289cc8adef7633a05e30a9ba;hb=330fdcfbbbfaaec1fb5b39d036e51376a3fc18f2;hp=61d0c28cb79deb01a222c510ffc57b33ea5911bc;hpb=37e18082cfb22491138e282074c5267df48dd8de;p=collectd.git diff --git a/src/df.c b/src/df.c index 61d0c28c..4b3cba01 100644 --- a/src/df.c +++ b/src/df.c @@ -60,8 +60,8 @@ static ignorelist_t *il_device = NULL; static ignorelist_t *il_mountpoint = NULL; static ignorelist_t *il_fstype = NULL; -static _Bool by_device = false; -static _Bool report_inodes = false; +static _Bool by_device = 0; +static _Bool report_inodes = 0; static int df_init (void) { @@ -116,21 +116,16 @@ static int df_config (const char *key, const char *value) else if (strcasecmp (key, "ReportByDevice") == 0) { if (IS_TRUE (value)) - by_device = true; + by_device = 1; return (0); } - else if (strcasecmp (key, "ReportReserved") == 0) - { - /* Nop for backwards compatibility. */ - return (0); - } else if (strcasecmp (key, "ReportInodes") == 0) { if (IS_TRUE (value)) - report_inodes = true; + report_inodes = 1; else - report_inodes = false; + report_inodes = 0; return (0); } @@ -177,7 +172,10 @@ static int df_read (void) mnt_list = NULL; if (cu_mount_getlist (&mnt_list) == NULL) + { + ERROR ("df plugin: cu_mount_getlist failed."); return (-1); + } for (mnt_ptr = mnt_list; mnt_ptr != NULL; mnt_ptr = mnt_ptr->next) {