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/win32/uptime.c')
-rw-r--r--src/libs/zbxsysinfo/win32/uptime.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libs/zbxsysinfo/win32/uptime.c b/src/libs/zbxsysinfo/win32/uptime.c
index fca4d803b9d..d264c3c9f61 100644
--- a/src/libs/zbxsysinfo/win32/uptime.c
+++ b/src/libs/zbxsysinfo/win32/uptime.c
@@ -18,24 +18,25 @@
**/
#include "zbxsysinfo.h"
+#include "../sysinfo.h"
-#include "perfmon.h"
+#include "zbxwin32.h"
-int SYSTEM_UPTIME(AGENT_REQUEST *request, AGENT_RESULT *result)
+int system_uptime(AGENT_REQUEST *request, AGENT_RESULT *result)
{
char counter_path[64];
AGENT_REQUEST request_tmp;
int ret;
zbx_snprintf(counter_path, sizeof(counter_path), "\\%u\\%u",
- (unsigned int)get_builtin_object_index(PCI_SYSTEM_UP_TIME),
- (unsigned int)get_builtin_counter_index(PCI_SYSTEM_UP_TIME));
+ (unsigned int)zbx_get_builtin_object_index(PCI_SYSTEM_UP_TIME),
+ (unsigned int)zbx_get_builtin_counter_index(PCI_SYSTEM_UP_TIME));
request_tmp.nparam = 1;
request_tmp.params = zbx_malloc(NULL, request_tmp.nparam * sizeof(char *));
request_tmp.params[0] = counter_path;
- ret = PERF_COUNTER(&request_tmp, result);
+ ret = perf_counter(&request_tmp, result);
zbx_free(request_tmp.params);