summaryrefslogtreecommitdiffstats
path: root/plugins/check_users.c
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2004-12-25 23:17:46 (GMT)
committerBenoit Mortier <opensides@users.sourceforge.net>2004-12-25 23:17:46 (GMT)
commite9ccc6b21a1152bbf150302c4a29a6df79d75bd7 (patch)
tree91bf1ebb6f927fd628b298df2ac5a89580282591 /plugins/check_users.c
parent71656b2aafffb69716620bf08cce76c925dc8fa3 (diff)
downloadmonitoring-plugins-e9ccc6b21a1152bbf150302c4a29a6df79d75bd7.tar.gz
various fixes for localization
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1061 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_users.c')
-rw-r--r--plugins/check_users.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/check_users.c b/plugins/check_users.c
index d1b4f01..25d04ed 100644
--- a/plugins/check_users.c
+++ b/plugins/check_users.c
@@ -140,9 +140,7 @@ process_arguments (int argc, char **argv)
140 140
141 switch (c) { 141 switch (c) {
142 case '?': /* print short usage statement if args not parsable */ 142 case '?': /* print short usage statement if args not parsable */
143 printf (_("%s: Unknown argument: %s\n\n"), progname, optarg); 143 usage2 (_("Unknown argument"), optarg);
144 print_usage ();
145 exit (STATE_UNKNOWN);
146 case 'h': /* help */ 144 case 'h': /* help */
147 print_help (); 145 print_help ();
148 exit (STATE_OK); 146 exit (STATE_OK);
@@ -151,13 +149,13 @@ process_arguments (int argc, char **argv)
151 exit (STATE_OK); 149 exit (STATE_OK);
152 case 'c': /* critical */ 150 case 'c': /* critical */
153 if (!is_intnonneg (optarg)) 151 if (!is_intnonneg (optarg))
154 usage (_("Critical threshold must be a positive integer\n")); 152 usage4 (_("Critical threshold must be a positive integer"));
155 else 153 else
156 cusers = atoi (optarg); 154 cusers = atoi (optarg);
157 break; 155 break;
158 case 'w': /* warning */ 156 case 'w': /* warning */
159 if (!is_intnonneg (optarg)) 157 if (!is_intnonneg (optarg))
160 usage (_("Warning threshold must be a positive integer\n")); 158 usage4 (_("Warning threshold must be a positive integer"));
161 else 159 else
162 wusers = atoi (optarg); 160 wusers = atoi (optarg);
163 break; 161 break;
@@ -167,14 +165,14 @@ process_arguments (int argc, char **argv)
167 c = optind; 165 c = optind;
168 if (wusers == -1 && argc > c) { 166 if (wusers == -1 && argc > c) {
169 if (is_intnonneg (argv[c]) == FALSE) 167 if (is_intnonneg (argv[c]) == FALSE)
170 usage (_("Warning threshold must be a positive integer\n")); 168 usage4 (_("Warning threshold must be a positive integer"));
171 else 169 else
172 wusers = atoi (argv[c++]); 170 wusers = atoi (argv[c++]);
173 } 171 }
174 172
175 if (cusers == -1 && argc > c) { 173 if (cusers == -1 && argc > c) {
176 if (is_intnonneg (argv[c]) == FALSE) 174 if (is_intnonneg (argv[c]) == FALSE)
177 usage (_("Warning threshold must be a positive integer\n")); 175 usage4 (_("Warning threshold must be a positive integer"));
178 else 176 else
179 cusers = atoi (argv[c]); 177 cusers = atoi (argv[c]);
180 } 178 }
@@ -210,7 +208,6 @@ system and generates an error if the number exceeds the thresholds specified.\n"
210} 208}
211 209
212 210
213
214void 211void
215print_usage (void) 212print_usage (void)
216{ 213{