diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c
index af6044a0e26e661fcbaafbad29c683d7a40d7802..dd49893b8f955011a3e26964bab39113d49f1ee6 100644 (file)
--- a/plugins/check_hpjd.c
+++ b/plugins/check_hpjd.c
* $Id$
*****************************************************************************/
+const char *progname = "check_hpjd";
+const char *revision = "$Revision$";
+const char *copyright = "2000-2004";
+const char *email = "nagiosplug-devel@lists.sourceforge.net";
+
#include "common.h"
#include "popen.h"
#include "utils.h"
#define DEFAULT_COMMUNITY "public"
-const char *progname = "check_hpjd";
-const char *revision = "$Revision$";
-const char *copyright = "2000-2003";
-const char *email = "nagiosplug-devel@lists.sourceforge.net";
const char *option_summary = "-H host [-C community]\n";
main (int argc, char **argv)
{
char command_line[1024];
- int result;
+ int result = STATE_UNKNOWN;
int line;
char input_buffer[MAX_INPUT_BUFFER];
char query_string[512];
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments (argc, argv) != OK)
- usage (_("check_hpjd: could not parse arguments\n"));
+ if (process_arguments (argc, argv) == ERROR)
+ usage4 (_("Could not parse arguments"));
/* removed ' 2>1' at end of command 10/27/1999 - EG */
/* create the query string */
}
-
/* process command-line arguments */
int
process_arguments (int argc, char **argv)
print_help ();
exit (STATE_OK);
case '?': /* help */
- printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
- print_usage ();
- exit (STATE_UNKNOWN);
+ usage2 (_("Unknown argument"), optarg);
}
}
}
-
int
validate_arguments (void)
{
}
-
void
print_help (void)
{
void
print_usage (void)
{
- printf (_("\
-Usage: %s -H host [-C community]\n"), progname);
- printf (_(UT_HLP_VRS), progname, progname);
+ printf ("Usage: %s -H host [-C community]\n", progname);
}