diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index da11e678091d36d319f10bd2ee25bf33d7597f94..8887afe8eeaf647fe695da34b07d244aac18afdd 100644 (file)
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
#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% */
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;
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, "%")) {
void
print_usage (void)
{
- printf ("Usage: %s <host_address>\n", PROGNAME);
+ printf ("Usage: %s <host_address>\n", progname);
}
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"