diff options
Diffstat (limited to 'plugins/check_dns.c')
-rw-r--r-- | plugins/check_dns.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 6c08c27..fa7fbc1 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | LIMITATION: nslookup on Solaris 7 can return output over 2 lines, which will not | 17 | LIMITATION: nslookup on Solaris 7 can return output over 2 lines, which will not |
18 | be picked up by this plugin | 18 | be picked up by this plugin |
19 | |||
20 | $Id$ | ||
19 | 21 | ||
20 | ******************************************************************************/ | 22 | ******************************************************************************/ |
21 | 23 | ||
@@ -71,7 +73,7 @@ main (int argc, char **argv) | |||
71 | } | 73 | } |
72 | 74 | ||
73 | if (process_arguments (argc, argv) != OK) { | 75 | if (process_arguments (argc, argv) != OK) { |
74 | print_usage (); | 76 | usage (_("check_dns: could not parse arguments\n")); |
75 | return STATE_UNKNOWN; | 77 | return STATE_UNKNOWN; |
76 | } | 78 | } |
77 | 79 | ||
@@ -213,6 +215,8 @@ main (int argc, char **argv) | |||
213 | return result; | 215 | return result; |
214 | } | 216 | } |
215 | 217 | ||
218 | |||
219 | |||
216 | int | 220 | int |
217 | error_scan (char *input_buffer) | 221 | error_scan (char *input_buffer) |
218 | { | 222 | { |
@@ -261,6 +265,8 @@ error_scan (char *input_buffer) | |||
261 | 265 | ||
262 | } | 266 | } |
263 | 267 | ||
268 | |||
269 | |||
264 | /* process command-line arguments */ | 270 | /* process command-line arguments */ |
265 | int | 271 | int |
266 | process_arguments (int argc, char **argv) | 272 | process_arguments (int argc, char **argv) |
@@ -320,7 +326,7 @@ process_arguments (int argc, char **argv) | |||
320 | /* TODO: this is_host check is probably unnecessary. */ | 326 | /* TODO: this is_host check is probably unnecessary. */ |
321 | /* Better to confirm nslookup response matches */ | 327 | /* Better to confirm nslookup response matches */ |
322 | if (is_host (optarg) == FALSE) { | 328 | if (is_host (optarg) == FALSE) { |
323 | printf (_("Invalid server name/address\n\n")); | 329 | printf (_("Invalid hostname/address\n\n")); |
324 | print_usage (); | 330 | print_usage (); |
325 | exit (STATE_UNKNOWN); | 331 | exit (STATE_UNKNOWN); |
326 | } | 332 | } |
@@ -370,6 +376,8 @@ process_arguments (int argc, char **argv) | |||
370 | return validate_arguments (); | 376 | return validate_arguments (); |
371 | } | 377 | } |
372 | 378 | ||
379 | |||
380 | |||
373 | int | 381 | int |
374 | validate_arguments () | 382 | validate_arguments () |
375 | { | 383 | { |
@@ -381,9 +389,6 @@ validate_arguments () | |||
381 | 389 | ||
382 | 390 | ||
383 | 391 | ||
384 | |||
385 | |||
386 | |||
387 | void | 392 | void |
388 | print_help (void) | 393 | print_help (void) |
389 | { | 394 | { |
@@ -419,7 +424,6 @@ specified in /etc/resolv.conf will be used.\n")); | |||
419 | 424 | ||
420 | 425 | ||
421 | 426 | ||
422 | |||
423 | void | 427 | void |
424 | print_usage (void) | 428 | print_usage (void) |
425 | { | 429 | { |