summaryrefslogtreecommitdiffstats
path: root/plugins/check_mysql.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_mysql.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_mysql.c')
-rw-r--r--plugins/check_mysql.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index deac37f..ffd96ed 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -54,7 +54,7 @@ main (int argc, char **argv)
54 textdomain (PACKAGE); 54 textdomain (PACKAGE);
55 55
56 if (process_arguments (argc, argv) != OK) 56 if (process_arguments (argc, argv) != OK)
57 usage (_("Incorrect arguments supplied\n")); 57 usage (_("check_mysql: could not parse arguments\n"));
58 58
59 /* initialize mysql */ 59 /* initialize mysql */
60 mysql_init (&mysql); 60 mysql_init (&mysql);
@@ -146,8 +146,6 @@ main (int argc, char **argv)
146 146
147 147
148 148
149
150
151/* process command-line arguments */ 149/* process command-line arguments */
152int 150int
153process_arguments (int argc, char **argv) 151process_arguments (int argc, char **argv)
@@ -183,7 +181,7 @@ process_arguments (int argc, char **argv)
183 db_host = optarg; 181 db_host = optarg;
184 } 182 }
185 else { 183 else {
186 usage2 (_("Invalid host name"), optarg); 184 usage2 (_("Invalid hostname/address"), optarg);
187 } 185 }
188 break; 186 break;
189 case 'd': /* hostname */ 187 case 'd': /* hostname */
@@ -208,7 +206,9 @@ process_arguments (int argc, char **argv)
208 print_help (); 206 print_help ();
209 exit (STATE_OK); 207 exit (STATE_OK);
210 case '?': /* help */ 208 case '?': /* help */
211 usage (_("Invalid argument\n")); 209 printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
210 print_usage ();
211 exit (STATE_UNKNOWN);
212 } 212 }
213 } 213 }
214 214
@@ -221,7 +221,7 @@ process_arguments (int argc, char **argv)
221 db_host = argv[c++]; 221 db_host = argv[c++];
222 } 222 }
223 else { 223 else {
224 usage2 (_("Invalid host name"), optarg); 224 usage2 (_("Invalid hostname/address"), optarg);
225 } 225 }
226 else if (strlen(db_user) == 0) 226 else if (strlen(db_user) == 0)
227 db_user = argv[c++]; 227 db_user = argv[c++];
@@ -240,8 +240,6 @@ process_arguments (int argc, char **argv)
240 240
241 241
242 242
243
244
245int 243int
246validate_arguments (void) 244validate_arguments (void)
247{ 245{
@@ -262,9 +260,6 @@ validate_arguments (void)
262 260
263 261
264 262
265
266
267
268void 263void
269print_help (void) 264print_help (void)
270{ 265{
@@ -304,7 +299,6 @@ a server listening on MySQL standard port %d will be checked\n"), MYSQL_PORT);
304 299
305 300
306 301
307
308void 302void
309print_usage (void) 303print_usage (void)
310{ 304{