summaryrefslogtreecommitdiffstats
path: root/plugins/check_fping.c
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-01-13 12:15:16 +0000
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-01-13 12:15:16 +0000
commit0c3386274ef5002dffc20337ef02407f24d7400c (patch)
tree1e78bac7844a548e56a642b35acfe1fd67342f71 /plugins/check_fping.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_fping.c')
-rw-r--r--plugins/check_fping.c14
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" 35const 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])
358void 358void
359print_usage (void) 359print_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
369print_help (void) 369print_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"