projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modbus plugin: Add support for libmodbus version 2.9.2.
[collectd.git]
/
src
/
df.c
diff --git
a/src/df.c
b/src/df.c
index
61d0c28
..
4b3cba0
100644
(file)
--- 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 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)
{
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))
else if (strcasecmp (key, "ReportByDevice") == 0)
{
if (IS_TRUE (value))
- by_device =
true
;
+ by_device =
1
;
return (0);
}
return (0);
}
- else if (strcasecmp (key, "ReportReserved") == 0)
- {
- /* Nop for backwards compatibility. */
- return (0);
- }
else if (strcasecmp (key, "ReportInodes") == 0)
{
if (IS_TRUE (value))
else if (strcasecmp (key, "ReportInodes") == 0)
{
if (IS_TRUE (value))
- report_inodes =
true
;
+ report_inodes =
1
;
else
else
- report_inodes =
false
;
+ report_inodes =
0
;
return (0);
}
return (0);
}
@@
-177,7
+172,10
@@
static int df_read (void)
mnt_list = NULL;
if (cu_mount_getlist (&mnt_list) == NULL)
mnt_list = NULL;
if (cu_mount_getlist (&mnt_list) == NULL)
+ {
+ ERROR ("df plugin: cu_mount_getlist failed.");
return (-1);
return (-1);
+ }
for (mnt_ptr = mnt_list; mnt_ptr != NULL; mnt_ptr = mnt_ptr->next)
{
for (mnt_ptr = mnt_list; mnt_ptr != NULL; mnt_ptr = mnt_ptr->next)
{