X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcheck_nwstat.c;h=601b25d32178004370c01f0a74d2baa3122f6772;hb=3982b98ba2db3ebebf65d7f0f4ad83a55a3efc49;hp=b791640f5e1d849efb5a7949586fd69699ed0140;hpb=edf60f6dceba48555f2534d9a217a8c5913ce029;p=nagiosplug.git diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c index b791640..601b25d 100644 --- a/plugins/check_nwstat.c +++ b/plugins/check_nwstat.c @@ -121,7 +121,7 @@ main(int argc, char **argv) { bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - if (process_arguments(argc,argv) != TRUE) + if (process_arguments(argc,argv) == ERROR) usage4 (_("Could not parse arguments")); /* initialize alarm signal handling */ @@ -760,9 +760,7 @@ int process_arguments(int argc, char **argv) { switch (c) { case '?': /* print short usage statement if args not parsable */ - printf ("%s: Unknown argument: %s\n\n", progname, optarg); - print_usage(); - exit(STATE_UNKNOWN); + usage2 (_("Unknown argument"), optarg); case 'h': /* help */ print_help(); exit(STATE_OK); @@ -779,7 +777,7 @@ int process_arguments(int argc, char **argv) { if (is_intnonneg(optarg)) server_port=atoi(optarg); else - die(STATE_UNKNOWN,_("Server port an integer (seconds)\nType '%s -h' for additional help\n"),progname); + die(STATE_UNKNOWN,_("Server port an integer\n")); break; case 'v': if (strlen(optarg)<3) @@ -908,9 +906,8 @@ void print_help(void) printf (COPYRIGHT, copyright, email); printf (_("\ -Usage: %s This plugin attempts to contact the MRTGEXT NLM running\n\ -on a Novell server to gather the requested system information.\n\n"), - progname); +This plugin attempts to contact the MRTGEXT NLM running on a\n\ +Novell server to gather the requested system information.\n\n")); print_usage(); @@ -989,5 +986,5 @@ void print_usage(void) { printf ("\ Usage: %s -H host [-p port] [-v variable] [-w warning] [-c critical]\n\ - [-t timeout].\n", progname); + [-t timeout].\n", progname); }