summaryrefslogtreecommitdiffstats
path: root/src/libs/zbxsysinfo/openbsd
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-12-15 09:11:06 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-12-15 09:11:06 +0000
commit2b2a59d510dcde8b06b9d6f98cea0c0917de96cc (patch)
tree681ab3aee796ea2994d807f432c45b6fda290a4f /src/libs/zbxsysinfo/openbsd
parent2b0a2c57ce5d2aae2e87fb0578618a4178f8b4f3 (diff)
downloadzabbix-2b2a59d510dcde8b06b9d6f98cea0c0917de96cc.tar.gz
zabbix-2b2a59d510dcde8b06b9d6f98cea0c0917de96cc.tar.xz
zabbix-2b2a59d510dcde8b06b9d6f98cea0c0917de96cc.zip
- fixed system.swap.size (Eugene)
- fixed vm.memory.size (Eugene) - fixed configuration file parsing for user specifed functions (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2414 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs/zbxsysinfo/openbsd')
-rw-r--r--src/libs/zbxsysinfo/openbsd/memory.c4
-rw-r--r--src/libs/zbxsysinfo/openbsd/swap.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/zbxsysinfo/openbsd/memory.c b/src/libs/zbxsysinfo/openbsd/memory.c
index caecfa3a..4c70e997 100644
--- a/src/libs/zbxsysinfo/openbsd/memory.c
+++ b/src/libs/zbxsysinfo/openbsd/memory.c
@@ -39,7 +39,7 @@ static int VM_MEMORY_TOTAL(const char *cmd, const char *param, unsigned flags, A
if(0==sysctl(mib,2,&v,&len,NULL,0))
{
- SET_UI64_RESULT(result, (v.t_rm+v.t_free) * sysconf(_SC_PAGESIZE));
+ SET_UI64_RESULT(result, (zbx_uint64_t)(v.t_rm+v.t_free) * (zbx_uint64_t)sysconf(_SC_PAGESIZE));
ret=SYSINFO_RET_OK;
}
return ret;
@@ -62,7 +62,7 @@ static int VM_MEMORY_FREE(const char *cmd, const char *param, unsigned flags, AG
if(0==sysctl(mib,2,&v,&len,NULL,0))
{
- SET_UI64_RESULT(result, v.t_free * sysconf(_SC_PAGESIZE));
+ SET_UI64_RESULT(result, (zbx_uint64_t)v.t_free * (zbx_uint64_t)sysconf(_SC_PAGESIZE));
ret=SYSINFO_RET_OK;
}
return ret;
diff --git a/src/libs/zbxsysinfo/openbsd/swap.c b/src/libs/zbxsysinfo/openbsd/swap.c
index 10d096ac..301a3203 100644
--- a/src/libs/zbxsysinfo/openbsd/swap.c
+++ b/src/libs/zbxsysinfo/openbsd/swap.c
@@ -106,8 +106,8 @@ SWP_FNCLIST
SWP_FNCLIST fl[] =
{
- {"total", SYSTEM_SWAP_FREE},
- {"free", SYSTEM_SWAP_TOTAL},
+ {"total", SYSTEM_SWAP_TOTAL},
+ {"free", SYSTEM_SWAP_FREE},
{0, 0}
};