diff options
Diffstat (limited to 'src/libs/zbxsysinfo/hpux/inodes.c')
-rw-r--r-- | src/libs/zbxsysinfo/hpux/inodes.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libs/zbxsysinfo/hpux/inodes.c b/src/libs/zbxsysinfo/hpux/inodes.c index 38a3d3b8c4a..509fee26cba 100644 --- a/src/libs/zbxsysinfo/hpux/inodes.c +++ b/src/libs/zbxsysinfo/hpux/inodes.c @@ -19,6 +19,7 @@ #include "inodes.h" #include "zbxsysinfo.h" +#include "../sysinfo.h" #include "log.h" @@ -56,8 +57,8 @@ int get_fs_inode_stat(const char *fs, zbx_uint64_t *itotal, zbx_uint64_t *ifree, } 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; @@ -65,8 +66,7 @@ int get_fs_inode_stat(const char *fs, zbx_uint64_t *itotal, zbx_uint64_t *ifree, #undef ZBX_FFREE } - -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; @@ -122,7 +122,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); } |