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_fping.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_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 @@ #include "popen.h" #include "utils.h" -#define PROGNAME "check_fping" +const char *progname = "check_fping"; #define PACKET_COUNT 1 #define PACKET_SIZE 56 #define UNKNOWN_PACKET_LOSS 200 /* 200% */ @@ -243,14 +243,14 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* print short usage statement if args not parsable */ - printf ("%s: Unknown argument: %s\n\n", my_basename (argv[0]), optarg); + printf ("%s: Unknown argument: %s\n\n", progname, optarg); print_usage (); exit (STATE_UNKNOWN); case 'h': /* help */ print_help (); exit (STATE_OK); case 'V': /* version */ - print_revision (my_basename (argv[0]), "$Revision$"); + print_revision (progname, "$Revision$"); exit (STATE_OK); case 'v': /* verbose mode */ verbose = TRUE; @@ -325,12 +325,12 @@ get_threshold (char *arg, char *rv[2]) arg1[strcspn (arg1, ",:")] = 0; if (strstr (arg1, "%") && strstr (arg2, "%")) terminate (STATE_UNKNOWN, - "%s: Only one threshold may be packet loss (%s)\n", PROGNAME, + "%s: Only one threshold may be packet loss (%s)\n", progname, arg); if (!strstr (arg1, "%") && !strstr (arg2, "%")) terminate (STATE_UNKNOWN, "%s: Only one threshold must be packet loss (%s)\n", - PROGNAME, arg); + progname, arg); } if (arg2 && strstr (arg2, "%")) { @@ -358,7 +358,7 @@ get_threshold (char *arg, char *rv[2]) void print_usage (void) { - printf ("Usage: %s <host_address>\n", PROGNAME); + printf ("Usage: %s <host_address>\n", progname); } @@ -369,7 +369,7 @@ void print_help (void) { - print_revision (PROGNAME, "$Revision$"); + print_revision (progname, "$Revision$"); printf ("Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n\n" |