Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/zbxsysinfo/linux/inodes.c')
-rw-r--r--src/libs/zbxsysinfo/linux/inodes.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libs/zbxsysinfo/linux/inodes.c b/src/libs/zbxsysinfo/linux/inodes.c
index 791bbdb7322..c29da19eae1 100644
--- a/src/libs/zbxsysinfo/linux/inodes.c
+++ b/src/libs/zbxsysinfo/linux/inodes.c
@@ -77,9 +77,10 @@ while(0)
}
else if (NULL != mode && (0 == strcmp(mode, "pfree") || 0 == strcmp(mode, "pused")))
{
- *error = zbx_strdup(NULL, "Cannot calculate percentage because total is zero.");
- return SYSINFO_RET_FAIL;
+ *pfree = 100.0;
+ *pused = 0.0;
}
+
return SYSINFO_RET_OK;
#undef ZBX_STATFS
#undef ZBX_FFREE
@@ -87,7 +88,7 @@ while(0)
#undef get_string
}
-static int vfs_fs_inode(AGENT_REQUEST *request, AGENT_RESULT *result)
+static int vfs_fs_inode_local(AGENT_REQUEST *request, AGENT_RESULT *result)
{
char *fsname, *mode, *error;
zbx_uint64_t total, free, used;
@@ -143,7 +144,7 @@ static int vfs_fs_inode(AGENT_REQUEST *request, AGENT_RESULT *result)
return SYSINFO_RET_OK;
}
-int VFS_FS_INODE(AGENT_REQUEST *request, AGENT_RESULT *result)
+int vfs_fs_inode(AGENT_REQUEST *request, AGENT_RESULT *result)
{
- return zbx_execute_threaded_metric(vfs_fs_inode, request, result);
+ return zbx_execute_threaded_metric(vfs_fs_inode_local, request, result);
}