aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_nagios.c
diff options
context:
space:
mode:
authorGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-01-13 12:15:16 +0000
committerGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-01-13 12:15:16 +0000
commit0c3386274ef5002dffc20337ef02407f24d7400c (patch)
tree1e78bac7844a548e56a642b35acfe1fd67342f71 /plugins/check_nagios.c
parentde5650f28e4e43a7264913953f95a75d8afe23f0 (diff)
downloadmonitoring-plugins-0c3386274ef5002dffc20337ef02407f24d7400c.tar.gz
convert PROGANE from a define to a const char
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@238 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_nagios.c')
-rw-r--r--plugins/check_nagios.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c
index d19445a5..5c4cd4a3 100644
--- a/plugins/check_nagios.c
+++ b/plugins/check_nagios.c
@@ -30,7 +30,7 @@
#include "popen.h"
#include "utils.h"
-const char *PROGNAME = "check_nagios";
+const char *progname = "check_nagios";
int process_arguments (int, char **);
void print_usage (void);
@@ -166,7 +166,7 @@ process_arguments (int argc, char **argv)
else
terminate (STATE_UNKNOWN,
"Expiration time must be an integer (seconds)\nType '%s -h' for additional help\n",
- PROGNAME);
+ progname);
process_string = argv[3];
return OK;
}
@@ -183,14 +183,14 @@ process_arguments (int argc, char **argv)
switch (c) {
case '?': /* print short usage statement if args not parsable */
- printf ("%s: Unknown argument: %c\n\n", PROGNAME, optopt);
+ printf ("%s: Unknown argument: %c\n\n", progname, optopt);
print_usage ();
exit (STATE_UNKNOWN);
case 'h': /* help */
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (PROGNAME, "$Revision$");
+ print_revision (progname, "$Revision$");
exit (STATE_OK);
case 'F': /* hostname */
status_log = optarg;
@@ -204,7 +204,7 @@ process_arguments (int argc, char **argv)
else
terminate (STATE_UNKNOWN,
"Expiration time must be an integer (seconds)\nType '%s -h' for additional help\n",
- PROGNAME);
+ progname);
break;
}
}
@@ -213,11 +213,11 @@ process_arguments (int argc, char **argv)
if (status_log == NULL)
terminate (STATE_UNKNOWN,
"You must provide the status_log\nType '%s -h' for additional help\n",
- PROGNAME);
+ progname);
else if (process_string == NULL)
terminate (STATE_UNKNOWN,
"You must provide a process string\nType '%s -h' for additional help\n",
- PROGNAME);
+ progname);
return OK;
}
@@ -231,7 +231,7 @@ print_usage (void)
{
printf
("Usage: %s -F <status log file> -e <expire_minutes> -C <process_string>\n",
- PROGNAME);
+ progname);
}
@@ -241,7 +241,7 @@ print_usage (void)
void
print_help (void)
{
- print_revision (PROGNAME, "$Revision$");
+ print_revision (progname, "$Revision$");
printf
("Copyright (c) 2000 Ethan Galstad/Karl DeBisschop\n\n"
"This plugin attempts to check the status of the Nagios process on the local\n"