"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/libs/zbxsysinfo/freebsd/diskspace.c" between
zabbix-5.4.0.tar.gz and zabbix-5.4.1.tar.gz

About: ZABBIX is an enterprise-class distributed monitoring solution for servers and applications.

diskspace.c  (zabbix-5.4.0):diskspace.c  (zabbix-5.4.1)
skipping to change at line 205 skipping to change at line 205
{ {
return zbx_execute_threaded_metric(vfs_fs_size, request, result); return zbx_execute_threaded_metric(vfs_fs_size, request, result);
} }
int VFS_FS_DISCOVERY(AGENT_REQUEST *request, AGENT_RESULT *result) int VFS_FS_DISCOVERY(AGENT_REQUEST *request, AGENT_RESULT *result)
{ {
int i, rc; int i, rc;
struct statfs *mntbuf; struct statfs *mntbuf;
struct zbx_json j; struct zbx_json j;
if (0 == (rc = getmntinfo(&mntbuf, MNT_WAIT))) if (0 == (rc = getmntinfo(&mntbuf, MNT_NOWAIT)))
{ {
SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot obtain system i nformation: %s", zbx_strerror(errno))); SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot obtain system i nformation: %s", zbx_strerror(errno)));
return SYSINFO_RET_FAIL; return SYSINFO_RET_FAIL;
} }
zbx_json_initarray(&j, ZBX_JSON_STAT_BUF_LEN); zbx_json_initarray(&j, ZBX_JSON_STAT_BUF_LEN);
for (i = 0; i < rc; i++) for (i = 0; i < rc; i++)
{ {
zbx_json_addobject(&j, NULL); zbx_json_addobject(&j, NULL);
skipping to change at line 245 skipping to change at line 245
zbx_uint64_t total, not_used, used; zbx_uint64_t total, not_used, used;
zbx_uint64_t itotal, inot_used, iused; zbx_uint64_t itotal, inot_used, iused;
double pfree, pused; double pfree, pused;
double ipfree, ipused; double ipfree, ipused;
char *error; char *error;
zbx_vector_ptr_t mntpoints; zbx_vector_ptr_t mntpoints;
zbx_mpoint_t *mntpoint; zbx_mpoint_t *mntpoint;
int ret = SYSINFO_RET_FAIL; int ret = SYSINFO_RET_FAIL;
char *mpoint; char *mpoint;
if (0 == (rc = getmntinfo(&mntbuf, MNT_WAIT))) if (0 == (rc = getmntinfo(&mntbuf, MNT_NOWAIT)))
{ {
SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot obtain system i nformation: %s", zbx_strerror(errno))); SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot obtain system i nformation: %s", zbx_strerror(errno)));
return SYSINFO_RET_FAIL; return SYSINFO_RET_FAIL;
} }
zbx_vector_ptr_create(&mntpoints); zbx_vector_ptr_create(&mntpoints);
for (i = 0; i < rc; i++) for (i = 0; i < rc; i++)
{ {
mpoint = mntbuf[i].f_mntonname; mpoint = mntbuf[i].f_mntonname;
skipping to change at line 285 skipping to change at line 285
mntpoint->bytes.pused = pused; mntpoint->bytes.pused = pused;
mntpoint->inodes.total = itotal; mntpoint->inodes.total = itotal;
mntpoint->inodes.used = iused; mntpoint->inodes.used = iused;
mntpoint->inodes.not_used = inot_used; mntpoint->inodes.not_used = inot_used;
mntpoint->inodes.pfree = ipfree; mntpoint->inodes.pfree = ipfree;
mntpoint->inodes.pused = ipused; mntpoint->inodes.pused = ipused;
zbx_vector_ptr_append(&mntpoints, mntpoint); zbx_vector_ptr_append(&mntpoints, mntpoint);
} }
if (0 == (rc = getmntinfo(&mntbuf, MNT_WAIT))) if (0 == (rc = getmntinfo(&mntbuf, MNT_NOWAIT)))
{ {
SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot obtain system i nformation: %s", zbx_strerror(errno))); SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot obtain system i nformation: %s", zbx_strerror(errno)));
goto out; goto out;
} }
zbx_json_initarray(&j, ZBX_JSON_STAT_BUF_LEN); zbx_json_initarray(&j, ZBX_JSON_STAT_BUF_LEN);
for (i = 0; i < rc; i++) for (i = 0; i < rc; i++)
{ {
int idx; int idx;
mpoint = mntbuf[i].f_mntonname; mpoint = mntbuf[i].f_mntonname;
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)