From 21d2b007b60d25fa2ea5c84ccfaee7d62c4f6d0a Mon Sep 17 00:00:00 2001 From: hugetoad Date: Wed, 26 Oct 2005 14:11:32 +0000 Subject: Minor cleanup. git-svn-id: svn://svn.zabbix.com/trunk@2225 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- src/libs/zbxsysinfo/aix/aix.c | 2 +- src/libs/zbxsysinfo/common/common.c | 12 ++++++------ src/libs/zbxsysinfo/freebsd/freebsd.c | 2 +- src/libs/zbxsysinfo/hpux/hpux.c | 2 +- src/libs/zbxsysinfo/linux/linux.c | 2 +- src/libs/zbxsysinfo/netbsd/netbsd.c | 2 +- src/libs/zbxsysinfo/openbsd/OpenBSD3.7.c | 2 +- src/libs/zbxsysinfo/openbsd/openbsd.c | 2 +- src/libs/zbxsysinfo/osf/osf.c | 2 +- src/libs/zbxsysinfo/osx/osx.c | 2 +- src/libs/zbxsysinfo/solaris/SunOS5.9.c | 2 +- src/libs/zbxsysinfo/solaris/solaris.c | 2 +- src/libs/zbxsysinfo/unknown/unknown.c | 2 +- 13 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/libs/zbxsysinfo/aix/aix.c b/src/libs/zbxsysinfo/aix/aix.c index 66540372..e04ef0e7 100644 --- a/src/libs/zbxsysinfo/aix/aix.c +++ b/src/libs/zbxsysinfo/aix/aix.c @@ -121,7 +121,7 @@ int CHECK_SERVICE_PERF(const char *cmd, const char *service,double *value, cons int CHECK_PORT(const char *cmd, const char *ip_and_port,double *value, const char *msg, int mlen_max); int CHECK_DNS(const char *cmd, const char *service,double *value, const char *msg, int mlen_max); -COMMAND parameters_specific[]= +ZBX_METRIC parameters_specific[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { diff --git a/src/libs/zbxsysinfo/common/common.c b/src/libs/zbxsysinfo/common/common.c index 953d8f22..88dc3630 100644 --- a/src/libs/zbxsysinfo/common/common.c +++ b/src/libs/zbxsysinfo/common/common.c @@ -158,15 +158,15 @@ void forward_request(char *proxy,char *command,int port,char *value, const char *msg, int mlen_max); -COMMAND *commands=NULL; +ZBX_METRIC *commands=NULL; -extern COMMAND parameters_specific[]; +extern ZBX_METRIC parameters_specific[]; extern int SYSTEM_LOCALTIME(const char *cmd, const char *parameter,double *value, const char *msg, int mlen_max); extern int check_ntp(char *host, int port, int *value_int); int EXECUTE_STR(const char *cmd, const char *command, const char *parameter, char **value, const char *msg, int mlen_max); -COMMAND parameters_common[]= +ZBX_METRIC parameters_common[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { {"system.localtime" ,SYSTEM_LOCALTIME, 0, 0}, @@ -195,7 +195,7 @@ void add_metric(char *key, int (*function)(),int (*function_str)(),char *paramet commands[i].function=function; commands[i].function_str=function_str; - commands=realloc(commands,(i+2)*sizeof(COMMAND)); + commands=realloc(commands,(i+2)*sizeof(ZBX_METRIC)); commands[i+1].key=NULL; break; } @@ -215,7 +215,7 @@ void add_user_parameter(char *key,char *command) commands[i].function_str=&EXECUTE_STR; commands[i].parameter=strdup(command); - commands=realloc(commands,(i+2)*sizeof(COMMAND)); + commands=realloc(commands,(i+2)*sizeof(ZBX_METRIC)); commands[i+1].key=NULL; break; @@ -240,7 +240,7 @@ void init_metrics() { int i; - commands=malloc(sizeof(COMMAND)); + commands=malloc(sizeof(ZBX_METRIC)); commands[0].key=NULL; for(i=0;parameters_common[i].key!=0;i++) diff --git a/src/libs/zbxsysinfo/freebsd/freebsd.c b/src/libs/zbxsysinfo/freebsd/freebsd.c index 66540372..e04ef0e7 100644 --- a/src/libs/zbxsysinfo/freebsd/freebsd.c +++ b/src/libs/zbxsysinfo/freebsd/freebsd.c @@ -121,7 +121,7 @@ int CHECK_SERVICE_PERF(const char *cmd, const char *service,double *value, cons int CHECK_PORT(const char *cmd, const char *ip_and_port,double *value, const char *msg, int mlen_max); int CHECK_DNS(const char *cmd, const char *service,double *value, const char *msg, int mlen_max); -COMMAND parameters_specific[]= +ZBX_METRIC parameters_specific[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { diff --git a/src/libs/zbxsysinfo/hpux/hpux.c b/src/libs/zbxsysinfo/hpux/hpux.c index 66540372..e04ef0e7 100644 --- a/src/libs/zbxsysinfo/hpux/hpux.c +++ b/src/libs/zbxsysinfo/hpux/hpux.c @@ -121,7 +121,7 @@ int CHECK_SERVICE_PERF(const char *cmd, const char *service,double *value, cons int CHECK_PORT(const char *cmd, const char *ip_and_port,double *value, const char *msg, int mlen_max); int CHECK_DNS(const char *cmd, const char *service,double *value, const char *msg, int mlen_max); -COMMAND parameters_specific[]= +ZBX_METRIC parameters_specific[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { diff --git a/src/libs/zbxsysinfo/linux/linux.c b/src/libs/zbxsysinfo/linux/linux.c index 66540372..e04ef0e7 100644 --- a/src/libs/zbxsysinfo/linux/linux.c +++ b/src/libs/zbxsysinfo/linux/linux.c @@ -121,7 +121,7 @@ int CHECK_SERVICE_PERF(const char *cmd, const char *service,double *value, cons int CHECK_PORT(const char *cmd, const char *ip_and_port,double *value, const char *msg, int mlen_max); int CHECK_DNS(const char *cmd, const char *service,double *value, const char *msg, int mlen_max); -COMMAND parameters_specific[]= +ZBX_METRIC parameters_specific[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { diff --git a/src/libs/zbxsysinfo/netbsd/netbsd.c b/src/libs/zbxsysinfo/netbsd/netbsd.c index 66540372..e04ef0e7 100644 --- a/src/libs/zbxsysinfo/netbsd/netbsd.c +++ b/src/libs/zbxsysinfo/netbsd/netbsd.c @@ -121,7 +121,7 @@ int CHECK_SERVICE_PERF(const char *cmd, const char *service,double *value, cons int CHECK_PORT(const char *cmd, const char *ip_and_port,double *value, const char *msg, int mlen_max); int CHECK_DNS(const char *cmd, const char *service,double *value, const char *msg, int mlen_max); -COMMAND parameters_specific[]= +ZBX_METRIC parameters_specific[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { diff --git a/src/libs/zbxsysinfo/openbsd/OpenBSD3.7.c b/src/libs/zbxsysinfo/openbsd/OpenBSD3.7.c index f78a39ec..8aa09d53 100755 --- a/src/libs/zbxsysinfo/openbsd/OpenBSD3.7.c +++ b/src/libs/zbxsysinfo/openbsd/OpenBSD3.7.c @@ -1629,7 +1629,7 @@ static int check_ldap(char *hostname, short port,int *value, const char *msg, } #endif -COMMAND agent_commands[]= +ZBX_METRIC agent_commands[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { {"kern[maxfiles]" ,KERNEL_MAXFILES, 0, 0}, diff --git a/src/libs/zbxsysinfo/openbsd/openbsd.c b/src/libs/zbxsysinfo/openbsd/openbsd.c index 66540372..e04ef0e7 100644 --- a/src/libs/zbxsysinfo/openbsd/openbsd.c +++ b/src/libs/zbxsysinfo/openbsd/openbsd.c @@ -121,7 +121,7 @@ int CHECK_SERVICE_PERF(const char *cmd, const char *service,double *value, cons int CHECK_PORT(const char *cmd, const char *ip_and_port,double *value, const char *msg, int mlen_max); int CHECK_DNS(const char *cmd, const char *service,double *value, const char *msg, int mlen_max); -COMMAND parameters_specific[]= +ZBX_METRIC parameters_specific[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { diff --git a/src/libs/zbxsysinfo/osf/osf.c b/src/libs/zbxsysinfo/osf/osf.c index bfff5901..0048d346 100644 --- a/src/libs/zbxsysinfo/osf/osf.c +++ b/src/libs/zbxsysinfo/osf/osf.c @@ -121,7 +121,7 @@ int CHECK_SERVICE_PERF(const char *cmd, const char *service,double *value, cons int CHECK_PORT(const char *cmd, const char *ip_and_port,double *value, const char *msg, int mlen_max); int CHECK_DNS(const char *cmd, const char *service,double *value, const char *msg, int mlen_max); -COMMAND parameters_specific[]= +ZBX_METRIC parameters_specific[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { diff --git a/src/libs/zbxsysinfo/osx/osx.c b/src/libs/zbxsysinfo/osx/osx.c index fa2c2462..5a92ba6c 100644 --- a/src/libs/zbxsysinfo/osx/osx.c +++ b/src/libs/zbxsysinfo/osx/osx.c @@ -122,7 +122,7 @@ int CHECK_SERVICE_PERF(const char *cmd, const char *service,double *value, cons int CHECK_PORT(const char *cmd, const char *ip_and_port,double *value, const char *msg, int mlen_max); int CHECK_DNS(const char *cmd, const char *service,double *value, const char *msg, int mlen_max); -COMMAND parameters_specific[]= +ZBX_METRIC parameters_specific[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { diff --git a/src/libs/zbxsysinfo/solaris/SunOS5.9.c b/src/libs/zbxsysinfo/solaris/SunOS5.9.c index 984857a6..6b9815e4 100755 --- a/src/libs/zbxsysinfo/solaris/SunOS5.9.c +++ b/src/libs/zbxsysinfo/solaris/SunOS5.9.c @@ -1653,7 +1653,7 @@ static int check_ldap(char *hostname, short port,int *value, const char *msg, in #endif */ -COMMAND agent_commands[]= +ZBX_METRIC agent_commands[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { /* diff --git a/src/libs/zbxsysinfo/solaris/solaris.c b/src/libs/zbxsysinfo/solaris/solaris.c index feff53cd..c2880a96 100644 --- a/src/libs/zbxsysinfo/solaris/solaris.c +++ b/src/libs/zbxsysinfo/solaris/solaris.c @@ -152,7 +152,7 @@ int CHECK_SERVICE_PERF(const char *cmd, const char *service,double *value, cons int CHECK_PORT(const char *cmd, const char *ip_and_port,double *value, const char *msg, int mlen_max); int CHECK_DNS(const char *cmd, const char *service,double *value, const char *msg, int mlen_max); -COMMAND parameters_specific[]= +ZBX_METRIC parameters_specific[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { diff --git a/src/libs/zbxsysinfo/unknown/unknown.c b/src/libs/zbxsysinfo/unknown/unknown.c index 66540372..e04ef0e7 100644 --- a/src/libs/zbxsysinfo/unknown/unknown.c +++ b/src/libs/zbxsysinfo/unknown/unknown.c @@ -121,7 +121,7 @@ int CHECK_SERVICE_PERF(const char *cmd, const char *service,double *value, cons int CHECK_PORT(const char *cmd, const char *ip_and_port,double *value, const char *msg, int mlen_max); int CHECK_DNS(const char *cmd, const char *service,double *value, const char *msg, int mlen_max); -COMMAND parameters_specific[]= +ZBX_METRIC parameters_specific[]= /* KEY FUNCTION (if double) FUNCTION (if string) PARAM*/ { -- cgit