X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fnegate.c;h=d08c3a309e30b868cd6dc7a51c0655d48797c5ee;hb=edf94c7d2a21142b0cf9613dbbc1ff7a48f456ef;hp=e03f7e682350bf856a45de86cef0fe72f1a35a70;hpb=694194dd8ab4d9115554f386938d503d60c96e9e;p=nagiosplug.git diff --git a/plugins/negate.c b/plugins/negate.c index e03f7e6..d08c3a3 100644 --- a/plugins/negate.c +++ b/plugins/negate.c @@ -83,7 +83,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")); /* Set signal handling and alarm */ @@ -174,9 +174,7 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* help */ - printf (_("%s: Unknown argument: %s\n\n"), progname, optarg); - print_usage (); - exit (STATE_UNKNOWN); + usage2 (_("Unknown argument"), optarg); break; case 'h': /* help */ print_help (); @@ -239,11 +237,10 @@ print_help (void) { print_revision (progname, revision); - printf (_(COPYRIGHT), copyright, email); + printf (COPYRIGHT, copyright, email); printf (_("\ -Negates the status of a plugin (returns OK for CRITICAL, and vice-versa).\n\ -\n")); +Negates the status of a plugin (returns OK for CRITICAL, and vice-versa).\n\n")); print_usage (); @@ -274,8 +271,5 @@ Otherwise, the output state of the wrapped plugin is unchanged.\n")); void print_usage (void) { - printf ("Usage: %s [-t timeout] \n", - progname); - - printf (UT_HLP_VRS, progname, progname); + printf ("Usage: %s [-t timeout] \n",progname); }