From d19edd4043c498626fe68308005947975ef0a697 Mon Sep 17 00:00:00 2001 From: Benoit Mortier Date: Wed, 1 Dec 2004 23:54:51 +0000 Subject: standardize localization string standardize unknow arguments git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@969 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_dns.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'plugins/check_dns.c') diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 6c08c277..fa7fbc1e 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -16,6 +16,8 @@ LIMITATION: nslookup on Solaris 7 can return output over 2 lines, which will not be picked up by this plugin + + $Id$ ******************************************************************************/ @@ -71,7 +73,7 @@ main (int argc, char **argv) } if (process_arguments (argc, argv) != OK) { - print_usage (); + usage (_("check_dns: could not parse arguments\n")); return STATE_UNKNOWN; } @@ -213,6 +215,8 @@ main (int argc, char **argv) return result; } + + int error_scan (char *input_buffer) { @@ -261,6 +265,8 @@ error_scan (char *input_buffer) } + + /* process command-line arguments */ int process_arguments (int argc, char **argv) @@ -320,7 +326,7 @@ process_arguments (int argc, char **argv) /* TODO: this is_host check is probably unnecessary. */ /* Better to confirm nslookup response matches */ if (is_host (optarg) == FALSE) { - printf (_("Invalid server name/address\n\n")); + printf (_("Invalid hostname/address\n\n")); print_usage (); exit (STATE_UNKNOWN); } @@ -370,6 +376,8 @@ process_arguments (int argc, char **argv) return validate_arguments (); } + + int validate_arguments () { @@ -381,9 +389,6 @@ validate_arguments () - - - void print_help (void) { @@ -419,7 +424,6 @@ specified in /etc/resolv.conf will be used.\n")); - void print_usage (void) { -- cgit v1.2.3-74-g34f1