summaryrefslogtreecommitdiffstats
path: root/plugins/check_dig.c
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2004-12-01 23:54:51 (GMT)
committerBenoit Mortier <opensides@users.sourceforge.net>2004-12-01 23:54:51 (GMT)
commitd19edd4043c498626fe68308005947975ef0a697 (patch)
tree7a213ee16f9331e928b1c32aa6c521c05519db58 /plugins/check_dig.c
parent1d8128e328f714258b7fec0c62245e1d187e0439 (diff)
downloadmonitoring-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_dig.c')
-rw-r--r--plugins/check_dig.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index 5b472ec..a500cdc 100644
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
@@ -14,6 +14,8 @@
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$
18
17*****************************************************************************/ 19*****************************************************************************/
18 20
19#include "common.h" 21#include "common.h"
@@ -128,7 +130,6 @@ main (int argc, char **argv)
128 asprintf (&output, _("Server not found in ANSWER SECTION")); 130 asprintf (&output, _("Server not found in ANSWER SECTION"));
129 result = STATE_WARNING; 131 result = STATE_WARNING;
130 } 132 }
131
132 } 133 }
133 134
134 } 135 }
@@ -181,8 +182,6 @@ main (int argc, char **argv)
181 182
182 183
183 184
184
185
186/* process command-line arguments */ 185/* process command-line arguments */
187int 186int
188process_arguments (int argc, char **argv) 187process_arguments (int argc, char **argv)
@@ -215,7 +214,9 @@ process_arguments (int argc, char **argv)
215 214
216 switch (c) { 215 switch (c) {
217 case '?': /* help */ 216 case '?': /* help */
218 usage3 (_("Unknown argument"), optopt); 217 printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
218 print_usage ();
219 exit (STATE_UNKNOWN);
219 case 'h': /* help */ 220 case 'h': /* help */
220 print_help (); 221 print_help ();
221 exit (STATE_OK); 222 exit (STATE_OK);
@@ -227,7 +228,7 @@ process_arguments (int argc, char **argv)
227 dns_server = optarg; 228 dns_server = optarg;
228 } 229 }
229 else { 230 else {
230 usage2 (_("Invalid hostname/adress"), optarg); 231 usage2 (_("Invalid hostname/address"), optarg);
231 } 232 }
232 break; 233 break;
233 case 'p': /* server port */ 234 case 'p': /* server port */
@@ -235,7 +236,7 @@ process_arguments (int argc, char **argv)
235 server_port = atoi (optarg); 236 server_port = atoi (optarg);
236 } 237 }
237 else { 238 else {
238 usage2 (_("port must be a positive integer"), optarg); 239 usage2 (_("Port must be a positive integer"), optarg);
239 } 240 }
240 break; 241 break;
241 case 'l': /* address to lookup */ 242 case 'l': /* address to lookup */
@@ -284,7 +285,7 @@ process_arguments (int argc, char **argv)
284 dns_server = argv[c]; 285 dns_server = argv[c];
285 } 286 }
286 else { 287 else {
287 usage2 (_("Invalid hostname/adress"), argv[c]); 288 usage2 (_("Invalid hostname/address"), argv[c]);
288 } 289 }
289 } 290 }
290 else { 291 else {
@@ -297,8 +298,6 @@ process_arguments (int argc, char **argv)
297 298
298 299
299 300
300
301
302int 301int
303validate_arguments (void) 302validate_arguments (void)
304{ 303{
@@ -307,9 +306,6 @@ validate_arguments (void)
307 306
308 307
309 308
310
311
312
313void 309void
314print_help (void) 310print_help (void)
315{ 311{
@@ -354,7 +350,6 @@ print_help (void)
354 350
355 351
356 352
357
358void 353void
359print_usage (void) 354print_usage (void)
360{ 355{