diff options
Diffstat (limited to 'plugins/check_fping.c')
| -rw-r--r-- | plugins/check_fping.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/check_fping.c b/plugins/check_fping.c index da11e678..8887afe8 100644 --- a/plugins/check_fping.c +++ b/plugins/check_fping.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | #include "popen.h" | 32 | #include "popen.h" |
| 33 | #include "utils.h" | 33 | #include "utils.h" |
| 34 | 34 | ||
| 35 | #define PROGNAME "check_fping" | 35 | const char *progname = "check_fping"; |
| 36 | #define PACKET_COUNT 1 | 36 | #define PACKET_COUNT 1 |
| 37 | #define PACKET_SIZE 56 | 37 | #define PACKET_SIZE 56 |
| 38 | #define UNKNOWN_PACKET_LOSS 200 /* 200% */ | 38 | #define UNKNOWN_PACKET_LOSS 200 /* 200% */ |
| @@ -243,14 +243,14 @@ process_arguments (int argc, char **argv) | |||
| 243 | 243 | ||
| 244 | switch (c) { | 244 | switch (c) { |
| 245 | case '?': /* print short usage statement if args not parsable */ | 245 | case '?': /* print short usage statement if args not parsable */ |
| 246 | printf ("%s: Unknown argument: %s\n\n", my_basename (argv[0]), optarg); | 246 | printf ("%s: Unknown argument: %s\n\n", progname, optarg); |
| 247 | print_usage (); | 247 | print_usage (); |
| 248 | exit (STATE_UNKNOWN); | 248 | exit (STATE_UNKNOWN); |
| 249 | case 'h': /* help */ | 249 | case 'h': /* help */ |
| 250 | print_help (); | 250 | print_help (); |
| 251 | exit (STATE_OK); | 251 | exit (STATE_OK); |
| 252 | case 'V': /* version */ | 252 | case 'V': /* version */ |
| 253 | print_revision (my_basename (argv[0]), "$Revision$"); | 253 | print_revision (progname, "$Revision$"); |
| 254 | exit (STATE_OK); | 254 | exit (STATE_OK); |
| 255 | case 'v': /* verbose mode */ | 255 | case 'v': /* verbose mode */ |
| 256 | verbose = TRUE; | 256 | verbose = TRUE; |
| @@ -325,12 +325,12 @@ get_threshold (char *arg, char *rv[2]) | |||
| 325 | arg1[strcspn (arg1, ",:")] = 0; | 325 | arg1[strcspn (arg1, ",:")] = 0; |
| 326 | if (strstr (arg1, "%") && strstr (arg2, "%")) | 326 | if (strstr (arg1, "%") && strstr (arg2, "%")) |
| 327 | terminate (STATE_UNKNOWN, | 327 | terminate (STATE_UNKNOWN, |
| 328 | "%s: Only one threshold may be packet loss (%s)\n", PROGNAME, | 328 | "%s: Only one threshold may be packet loss (%s)\n", progname, |
| 329 | arg); | 329 | arg); |
| 330 | if (!strstr (arg1, "%") && !strstr (arg2, "%")) | 330 | if (!strstr (arg1, "%") && !strstr (arg2, "%")) |
| 331 | terminate (STATE_UNKNOWN, | 331 | terminate (STATE_UNKNOWN, |
| 332 | "%s: Only one threshold must be packet loss (%s)\n", | 332 | "%s: Only one threshold must be packet loss (%s)\n", |
| 333 | PROGNAME, arg); | 333 | progname, arg); |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | if (arg2 && strstr (arg2, "%")) { | 336 | if (arg2 && strstr (arg2, "%")) { |
| @@ -358,7 +358,7 @@ get_threshold (char *arg, char *rv[2]) | |||
| 358 | void | 358 | void |
| 359 | print_usage (void) | 359 | print_usage (void) |
| 360 | { | 360 | { |
| 361 | printf ("Usage: %s <host_address>\n", PROGNAME); | 361 | printf ("Usage: %s <host_address>\n", progname); |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | 364 | ||
| @@ -369,7 +369,7 @@ void | |||
| 369 | print_help (void) | 369 | print_help (void) |
| 370 | { | 370 | { |
| 371 | 371 | ||
| 372 | print_revision (PROGNAME, "$Revision$"); | 372 | print_revision (progname, "$Revision$"); |
| 373 | 373 | ||
| 374 | printf | 374 | printf |
| 375 | ("Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n\n" | 375 | ("Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n\n" |
