Code

reverting my changes from !=TRUE to == ERROR, that's not good ;-( sorry
[nagiosplug.git] / plugins / check_hpjd.c
index af6044a0e26e661fcbaafbad29c683d7a40d7802..d49661ad3498007411557bf214087ecc5213fed8 100644 (file)
 * $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";
 
@@ -59,7 +60,7 @@ int
 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];
@@ -84,8 +85,8 @@ main (int argc, char **argv)
        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 */
@@ -397,7 +398,5 @@ Net-snmp must be installed on the computer running the plugin.\n\n"));
 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);
 }