From df1bd0c89ff63de64ee630e0025389651947020c Mon Sep 17 00:00:00 2001 From: Benoit Mortier Date: Thu, 2 Dec 2004 14:54:36 +0000 Subject: [PATCH] return of process_arguments() is TRUE not OK ! git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@978 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_by_ssh.c | 2 +- plugins/check_dig.c | 2 +- plugins/check_disk.c | 2 +- plugins/check_dns.c | 3 +-- plugins/check_fping.c | 2 +- plugins/check_game.c | 2 +- plugins/check_hpjd.c | 2 +- plugins/check_ldap.c | 2 +- plugins/check_load.c | 2 +- plugins/check_mrtg.c | 2 +- plugins/check_mrtgtraf.c | 2 +- plugins/check_mysql.c | 2 +- plugins/check_nagios.c | 2 +- plugins/check_nt.c | 2 +- plugins/check_nwstat.c | 2 +- plugins/check_overcr.c | 2 +- plugins/check_pgsql.c | 2 +- plugins/check_ping.c | 2 +- plugins/check_procs.c | 2 +- plugins/check_radius.c | 2 +- plugins/check_real.c | 2 +- plugins/check_smtp.c | 2 +- plugins/check_snmp.c | 2 +- plugins/check_ssh.c | 2 +- plugins/check_swap.c | 2 +- plugins/check_tcp.c | 2 +- plugins/check_time.c | 2 +- plugins/check_udp.c | 2 +- plugins/check_ups.c | 2 +- plugins/check_users.c | 2 +- plugins/negate.c | 2 +- 31 files changed, 31 insertions(+), 32 deletions(-) diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c index 8f6cde9..20ae628 100644 --- a/plugins/check_by_ssh.c +++ b/plugins/check_by_ssh.c @@ -68,7 +68,7 @@ main (int argc, char **argv) textdomain (PACKAGE); /* process arguments */ - if (process_arguments (argc, argv) == ERROR) + if (process_arguments (argc, argv) != TRUE) usage (_("check_by_ssh: could not parse arguments\n")); diff --git a/plugins/check_dig.c b/plugins/check_dig.c index a500cdc..14c0da5 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c @@ -68,7 +68,7 @@ main (int argc, char **argv) if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) usage (_("Cannot catch SIGALRM\n")); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("Could not parse arguments\n")); /* get the command to run */ diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 437bbbf..0cab9ac 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c @@ -163,7 +163,7 @@ main (int argc, char **argv) mount_list = read_filesystem_list (0); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_disk: could not parse arguments\n")); for (me = mount_list; me; me = me->me_next) { diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 9ab001f..d64431a 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -72,9 +72,8 @@ main (int argc, char **argv) return STATE_UNKNOWN; } - if (process_arguments (argc, argv) != OK) { + if (process_arguments (argc, argv) != TRUE) { usage (_("check_dns: could not parse arguments\n")); - return STATE_UNKNOWN; } /* get the command to run */ diff --git a/plugins/check_fping.c b/plugins/check_fping.c index 8647330..74236d9 100644 --- a/plugins/check_fping.c +++ b/plugins/check_fping.c @@ -67,7 +67,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) == ERROR) + if (process_arguments (argc, argv) != TRUE) usage (_("check_fping: could not parse arguments\n")); server = strscpy (server, server_name); diff --git a/plugins/check_game.c b/plugins/check_game.c index 3a8b9f5..c8492d8 100644 --- a/plugins/check_game.c +++ b/plugins/check_game.c @@ -67,7 +67,7 @@ main (int argc, char **argv) // result = process_arguments (argc, argv); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_game: could not parse arguments\n")); /* if (result != OK) { diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c index af6044a..5fdfc8a 100644 --- a/plugins/check_hpjd.c +++ b/plugins/check_hpjd.c @@ -84,7 +84,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_hpjd: could not parse arguments\n")); /* removed ' 2>1' at end of command 10/27/1999 - EG */ diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index 0dc0380..07b89ac 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c @@ -72,7 +72,7 @@ main (int argc, char *argv[]) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) == ERROR) + if (process_arguments (argc, argv) != TRUE) usage (_("check_ldap: could not parse arguments\n")); /* initialize alarm signal handling */ diff --git a/plugins/check_load.c b/plugins/check_load.c index 616c3e0..8322dbb 100644 --- a/plugins/check_load.c +++ b/plugins/check_load.c @@ -73,7 +73,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_load: could not parse arguments\n")); #if HAVE_GETLOADAVG==1 diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c index 2badd4a..58717bf 100644 --- a/plugins/check_mrtg.c +++ b/plugins/check_mrtg.c @@ -59,7 +59,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_mrtg: could not parse arguments\n")); /* open the MRTG log file for reading */ diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c index b9c277b..5bbce50 100644 --- a/plugins/check_mrtgtraf.c +++ b/plugins/check_mrtgtraf.c @@ -62,7 +62,7 @@ main (int argc, char **argv) char incoming_speed_rating[8]; char outgoing_speed_rating[8]; - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_ldap: could not parse arguments\n")); /* open the MRTG log file for reading */ diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 703a1ba..0564f7c 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c @@ -55,7 +55,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_mysql: could not parse arguments\n")); /* initialize mysql */ diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c index bb2ae6d..7c36d11 100644 --- a/plugins/check_nagios.c +++ b/plugins/check_nagios.c @@ -65,7 +65,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_nagios: could not parse arguments\n")); /* Set signal handling and alarm */ diff --git a/plugins/check_nt.c b/plugins/check_nt.c index 15f3dc3..c7fc745 100644 --- a/plugins/check_nt.c +++ b/plugins/check_nt.c @@ -110,7 +110,7 @@ int main(int argc, char **argv){ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if(process_arguments(argc,argv) != OK) + if(process_arguments(argc,argv) != TRUE) usage (_("check_nt: could not parse arguments\n")); /* initialize alarm signal handling */ diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c index 6a21f90..a6d2e24 100644 --- a/plugins/check_nwstat.c +++ b/plugins/check_nwstat.c @@ -121,7 +121,7 @@ main(int argc, char **argv) { bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments(argc,argv) != OK) + if (process_arguments(argc,argv) != TRUE) usage (_("check_nwstat: could not parse arguments\n")); /* initialize alarm signal handling */ diff --git a/plugins/check_overcr.c b/plugins/check_overcr.c index fea87da..cb85dc6 100644 --- a/plugins/check_overcr.c +++ b/plugins/check_overcr.c @@ -85,7 +85,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_overcr: could not parse arguments\n")); /* initialize alarm signal handling */ diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index bbf47f0..5c3b810 100644 --- a/plugins/check_pgsql.c +++ b/plugins/check_pgsql.c @@ -132,7 +132,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_pgsql: could not parse arguments\n")); /* Set signal handling and alarm */ diff --git a/plugins/check_ping.c b/plugins/check_ping.c index 0e09054..6d8ef06 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c @@ -78,7 +78,7 @@ main (int argc, char **argv) addresses = malloc (sizeof(char*) * max_addr); addresses[0] = NULL; - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_ping: could not parse arguments\n")); /* Set signal handling and alarm */ diff --git a/plugins/check_procs.c b/plugins/check_procs.c index b7f32c7..d1e1b7c 100644 --- a/plugins/check_procs.c +++ b/plugins/check_procs.c @@ -115,7 +115,7 @@ main (int argc, char **argv) asprintf (&metric_name, "PROCS"); metric = METRIC_PROCS; - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_procs: could not parse arguments\n")); /* Set signal handling and alarm timeout */ diff --git a/plugins/check_radius.c b/plugins/check_radius.c index b15ad6e..405b417 100644 --- a/plugins/check_radius.c +++ b/plugins/check_radius.c @@ -112,7 +112,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_radius: could not parse arguments\n")); str = strdup ("dictionary"); diff --git a/plugins/check_real.c b/plugins/check_real.c index 59ad7d0..9a8f42a 100644 --- a/plugins/check_real.c +++ b/plugins/check_real.c @@ -64,7 +64,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_real: could not parse arguments\n")); /* initialize alarm signal handling */ diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index 696af65..3322494 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c @@ -88,7 +88,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_smtp: could not parse arguments\n")); /* initialize the HELO command with the localhostname */ diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index 5167eb5..c7dff3d 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -156,7 +156,7 @@ main (int argc, char **argv) output_delim = strdup (DEFAULT_OUTPUT_DELIMITER); miblist = strdup (DEFAULT_MIBLIST); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_snmp: could not parse arguments\n")); /* create the command line to execute */ diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index 46dd044..f9bbd12 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c @@ -57,7 +57,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_ssh: could not parse arguments\n")); /* initialize alarm signal handling */ diff --git a/plugins/check_swap.c b/plugins/check_swap.c index 064c65e..f2d722c 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c @@ -89,7 +89,7 @@ main (int argc, char **argv) tmp_status = strdup (""); perf = strdup (""); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("Incorrect arguments supplied\n")); #ifdef HAVE_PROC_MEMINFO diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index da70c5d..ed51e94 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -239,7 +239,7 @@ main (int argc, char **argv) server_quit = QUIT; status = strdup (""); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_tcp: could not parse arguments\n")); /* use default expect if none listed in process_arguments() */ diff --git a/plugins/check_time.c b/plugins/check_time.c index 7c4fe41..042a7d5 100644 --- a/plugins/check_time.c +++ b/plugins/check_time.c @@ -62,7 +62,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_time: could not parse arguments\n")); /* initialize alarm signal handling */ diff --git a/plugins/check_udp.c b/plugins/check_udp.c index 3706a72..fb7cae1 100644 --- a/plugins/check_udp.c +++ b/plugins/check_udp.c @@ -51,7 +51,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_udp: could not parse arguments\n")); /* initialize alarm signal handling */ diff --git a/plugins/check_ups.c b/plugins/check_ups.c index 78e17b0..4006031 100644 --- a/plugins/check_ups.c +++ b/plugins/check_ups.c @@ -111,7 +111,7 @@ main (int argc, char **argv) data = strdup (""); message = strdup (""); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("check_ups: could not parse arguments\n")); /* initialize alarm signal handling */ diff --git a/plugins/check_users.c b/plugins/check_users.c index 0417bad..23f8973 100644 --- a/plugins/check_users.c +++ b/plugins/check_users.c @@ -50,7 +50,7 @@ main (int argc, char **argv) perf = strdup(""); - if (process_arguments (argc, argv) == ERROR) + if (process_arguments (argc, argv) != TRUE) usage (_("check_users: could not parse arguments\n")); /* run the command */ diff --git a/plugins/negate.c b/plugins/negate.c index 93ef46b..02838a6 100644 --- a/plugins/negate.c +++ b/plugins/negate.c @@ -83,7 +83,7 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments (argc, argv) != OK) + if (process_arguments (argc, argv) != TRUE) usage (_("negate: could not parse arguments\n")); /* Set signal handling and alarm */ -- 2.30.2