diff options
| author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-01-13 12:15:16 +0000 |
|---|---|---|
| committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-01-13 12:15:16 +0000 |
| commit | 0c3386274ef5002dffc20337ef02407f24d7400c (patch) | |
| tree | 1e78bac7844a548e56a642b35acfe1fd67342f71 /plugins/check_nagios.c | |
| parent | de5650f28e4e43a7264913953f95a75d8afe23f0 (diff) | |
| download | monitoring-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.c | 18 |
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 @@ | |||
| 30 | #include "popen.h" | 30 | #include "popen.h" |
| 31 | #include "utils.h" | 31 | #include "utils.h" |
| 32 | 32 | ||
| 33 | const char *PROGNAME = "check_nagios"; | 33 | const char *progname = "check_nagios"; |
| 34 | 34 | ||
| 35 | int process_arguments (int, char **); | 35 | int process_arguments (int, char **); |
| 36 | void print_usage (void); | 36 | void print_usage (void); |
| @@ -166,7 +166,7 @@ process_arguments (int argc, char **argv) | |||
| 166 | else | 166 | else |
| 167 | terminate (STATE_UNKNOWN, | 167 | terminate (STATE_UNKNOWN, |
| 168 | "Expiration time must be an integer (seconds)\nType '%s -h' for additional help\n", | 168 | "Expiration time must be an integer (seconds)\nType '%s -h' for additional help\n", |
| 169 | PROGNAME); | 169 | progname); |
| 170 | process_string = argv[3]; | 170 | process_string = argv[3]; |
| 171 | return OK; | 171 | return OK; |
| 172 | } | 172 | } |
| @@ -183,14 +183,14 @@ process_arguments (int argc, char **argv) | |||
| 183 | 183 | ||
| 184 | switch (c) { | 184 | switch (c) { |
| 185 | case '?': /* print short usage statement if args not parsable */ | 185 | case '?': /* print short usage statement if args not parsable */ |
| 186 | printf ("%s: Unknown argument: %c\n\n", PROGNAME, optopt); | 186 | printf ("%s: Unknown argument: %c\n\n", progname, optopt); |
| 187 | print_usage (); | 187 | print_usage (); |
| 188 | exit (STATE_UNKNOWN); | 188 | exit (STATE_UNKNOWN); |
| 189 | case 'h': /* help */ | 189 | case 'h': /* help */ |
| 190 | print_help (); | 190 | print_help (); |
| 191 | exit (STATE_OK); | 191 | exit (STATE_OK); |
| 192 | case 'V': /* version */ | 192 | case 'V': /* version */ |
| 193 | print_revision (PROGNAME, "$Revision$"); | 193 | print_revision (progname, "$Revision$"); |
| 194 | exit (STATE_OK); | 194 | exit (STATE_OK); |
| 195 | case 'F': /* hostname */ | 195 | case 'F': /* hostname */ |
| 196 | status_log = optarg; | 196 | status_log = optarg; |
| @@ -204,7 +204,7 @@ process_arguments (int argc, char **argv) | |||
| 204 | else | 204 | else |
| 205 | terminate (STATE_UNKNOWN, | 205 | terminate (STATE_UNKNOWN, |
| 206 | "Expiration time must be an integer (seconds)\nType '%s -h' for additional help\n", | 206 | "Expiration time must be an integer (seconds)\nType '%s -h' for additional help\n", |
| 207 | PROGNAME); | 207 | progname); |
| 208 | break; | 208 | break; |
| 209 | } | 209 | } |
| 210 | } | 210 | } |
| @@ -213,11 +213,11 @@ process_arguments (int argc, char **argv) | |||
| 213 | if (status_log == NULL) | 213 | if (status_log == NULL) |
| 214 | terminate (STATE_UNKNOWN, | 214 | terminate (STATE_UNKNOWN, |
| 215 | "You must provide the status_log\nType '%s -h' for additional help\n", | 215 | "You must provide the status_log\nType '%s -h' for additional help\n", |
| 216 | PROGNAME); | 216 | progname); |
| 217 | else if (process_string == NULL) | 217 | else if (process_string == NULL) |
| 218 | terminate (STATE_UNKNOWN, | 218 | terminate (STATE_UNKNOWN, |
| 219 | "You must provide a process string\nType '%s -h' for additional help\n", | 219 | "You must provide a process string\nType '%s -h' for additional help\n", |
| 220 | PROGNAME); | 220 | progname); |
| 221 | 221 | ||
| 222 | return OK; | 222 | return OK; |
| 223 | } | 223 | } |
| @@ -231,7 +231,7 @@ print_usage (void) | |||
| 231 | { | 231 | { |
| 232 | printf | 232 | printf |
| 233 | ("Usage: %s -F <status log file> -e <expire_minutes> -C <process_string>\n", | 233 | ("Usage: %s -F <status log file> -e <expire_minutes> -C <process_string>\n", |
| 234 | PROGNAME); | 234 | progname); |
| 235 | } | 235 | } |
| 236 | 236 | ||
| 237 | 237 | ||
| @@ -241,7 +241,7 @@ print_usage (void) | |||
| 241 | void | 241 | void |
| 242 | print_help (void) | 242 | print_help (void) |
| 243 | { | 243 | { |
| 244 | print_revision (PROGNAME, "$Revision$"); | 244 | print_revision (progname, "$Revision$"); |
| 245 | printf | 245 | printf |
| 246 | ("Copyright (c) 2000 Ethan Galstad/Karl DeBisschop\n\n" | 246 | ("Copyright (c) 2000 Ethan Galstad/Karl DeBisschop\n\n" |
| 247 | "This plugin attempts to check the status of the Nagios process on the local\n" | 247 | "This plugin attempts to check the status of the Nagios process on the local\n" |
