diff --git a/plugins/negate.c b/plugins/negate.c
index 9e5cf46fd8a490e9bebec8b24b534ac7696cf340..d08c3a309e30b868cd6dc7a51c0655d48797c5ee 100644 (file)
--- a/plugins/negate.c
+++ b/plugins/negate.c
const char *progname = "negate";
const char *revision = "$Revision$";
-const char *copyright = "2002-2003";
+const char *copyright = "2002-2004";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
#define DEFAULT_TIMEOUT 9
textdomain (PACKAGE);
if (process_arguments (argc, argv) == ERROR)
- usage (_("negate: could not parse arguments\n"));
+ usage4 (_("Could not parse arguments"));
/* Set signal handling and alarm */
if (signal (SIGALRM, timeout_alarm_handler) == SIG_ERR)
die (STATE_UNKNOWN, _("Could not open pipe: %s\n"), command_line);
child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
+
if (child_stderr == NULL) {
printf (_("Could not open stderr for %s\n"), command_line);
}
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 ();
{
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 ();
void
print_usage (void)
{
- printf (_("Usage: %s [-t timeout] <definition of wrapped plugin>\n"),
- progname);
- printf (_(UT_HLP_VRS), progname, progname);
+ printf ("Usage: %s [-t timeout] <definition of wrapped plugin>\n",progname);
}