diff options
author | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-01 23:54:51 (GMT) |
---|---|---|
committer | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-01 23:54:51 (GMT) |
commit | d19edd4043c498626fe68308005947975ef0a697 (patch) | |
tree | 7a213ee16f9331e928b1c32aa6c521c05519db58 /plugins/check_hpjd.c | |
parent | 1d8128e328f714258b7fec0c62245e1d187e0439 (diff) | |
download | monitoring-plugins-d19edd4043c498626fe68308005947975ef0a697.tar.gz |
standardize localization string
standardize unknow arguments
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@969 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_hpjd.c')
-rw-r--r-- | plugins/check_hpjd.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c index 5699570..af6044a 100644 --- a/plugins/check_hpjd.c +++ b/plugins/check_hpjd.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * along with this program; if not, write to the Free Software | 14 | * along with this program; if not, write to the Free Software |
15 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 15 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
16 | * | 16 | * |
17 | * $Id$ | ||
17 | *****************************************************************************/ | 18 | *****************************************************************************/ |
18 | 19 | ||
19 | #include "common.h" | 20 | #include "common.h" |
@@ -84,7 +85,7 @@ main (int argc, char **argv) | |||
84 | textdomain (PACKAGE); | 85 | textdomain (PACKAGE); |
85 | 86 | ||
86 | if (process_arguments (argc, argv) != OK) | 87 | if (process_arguments (argc, argv) != OK) |
87 | usage (_("Incorrect arguments supplied\n")); | 88 | usage (_("check_hpjd: could not parse arguments\n")); |
88 | 89 | ||
89 | /* removed ' 2>1' at end of command 10/27/1999 - EG */ | 90 | /* removed ' 2>1' at end of command 10/27/1999 - EG */ |
90 | /* create the query string */ | 91 | /* create the query string */ |
@@ -285,8 +286,6 @@ main (int argc, char **argv) | |||
285 | 286 | ||
286 | 287 | ||
287 | 288 | ||
288 | |||
289 | |||
290 | /* process command-line arguments */ | 289 | /* process command-line arguments */ |
291 | int | 290 | int |
292 | process_arguments (int argc, char **argv) | 291 | process_arguments (int argc, char **argv) |
@@ -321,7 +320,7 @@ process_arguments (int argc, char **argv) | |||
321 | address = strscpy(address, optarg) ; | 320 | address = strscpy(address, optarg) ; |
322 | } | 321 | } |
323 | else { | 322 | else { |
324 | usage2 (_("Invalid host name"), optarg); | 323 | usage2 (_("Invalid hostname/address"), optarg); |
325 | } | 324 | } |
326 | break; | 325 | break; |
327 | case 'C': /* community */ | 326 | case 'C': /* community */ |
@@ -334,7 +333,9 @@ process_arguments (int argc, char **argv) | |||
334 | print_help (); | 333 | print_help (); |
335 | exit (STATE_OK); | 334 | exit (STATE_OK); |
336 | case '?': /* help */ | 335 | case '?': /* help */ |
337 | usage (_("Invalid argument\n")); | 336 | printf (_("%s: Unknown argument: %s\n\n"), progname, optarg); |
337 | print_usage (); | ||
338 | exit (STATE_UNKNOWN); | ||
338 | } | 339 | } |
339 | } | 340 | } |
340 | 341 | ||
@@ -344,7 +345,7 @@ process_arguments (int argc, char **argv) | |||
344 | address = argv[c++]; | 345 | address = argv[c++]; |
345 | } | 346 | } |
346 | else { | 347 | else { |
347 | usage2 (_("Invalid host name"), argv[c]); | 348 | usage2 (_("Invalid hostname/address"), argv[c]); |
348 | } | 349 | } |
349 | } | 350 | } |
350 | 351 | ||
@@ -360,8 +361,6 @@ process_arguments (int argc, char **argv) | |||
360 | 361 | ||
361 | 362 | ||
362 | 363 | ||
363 | |||
364 | |||
365 | int | 364 | int |
366 | validate_arguments (void) | 365 | validate_arguments (void) |
367 | { | 366 | { |
@@ -370,9 +369,6 @@ validate_arguments (void) | |||
370 | 369 | ||
371 | 370 | ||
372 | 371 | ||
373 | |||
374 | |||
375 | |||
376 | void | 372 | void |
377 | print_help (void) | 373 | print_help (void) |
378 | { | 374 | { |
@@ -398,7 +394,6 @@ Net-snmp must be installed on the computer running the plugin.\n\n")); | |||
398 | 394 | ||
399 | 395 | ||
400 | 396 | ||
401 | |||
402 | void | 397 | void |
403 | print_usage (void) | 398 | print_usage (void) |
404 | { | 399 | { |