diff options
author | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-25 23:17:46 (GMT) |
---|---|---|
committer | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-25 23:17:46 (GMT) |
commit | e9ccc6b21a1152bbf150302c4a29a6df79d75bd7 (patch) | |
tree | 91bf1ebb6f927fd628b298df2ac5a89580282591 /plugins/popen.c | |
parent | 71656b2aafffb69716620bf08cce76c925dc8fa3 (diff) | |
download | monitoring-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/popen.c')
-rw-r--r-- | plugins/popen.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/popen.c b/plugins/popen.c index 94ad583..04eb388 100644 --- a/plugins/popen.c +++ b/plugins/popen.c | |||
@@ -114,7 +114,7 @@ spopen (const char *cmdstring) | |||
114 | argv = malloc (sizeof(char*)*argc); | 114 | argv = malloc (sizeof(char*)*argc); |
115 | 115 | ||
116 | if (argv == NULL) { | 116 | if (argv == NULL) { |
117 | printf ("Could not malloc argv array in popen()\n"); | 117 | printf (_("Could not malloc argv array in popen()\n")); |
118 | return NULL; | 118 | return NULL; |
119 | } | 119 | } |
120 | 120 | ||
@@ -124,7 +124,7 @@ spopen (const char *cmdstring) | |||
124 | str += strspn (str, " \t\r\n"); /* trim any leading whitespace */ | 124 | str += strspn (str, " \t\r\n"); /* trim any leading whitespace */ |
125 | 125 | ||
126 | if (i >= argc - 2) { | 126 | if (i >= argc - 2) { |
127 | printf ("CRITICAL - You need more args!!!\n"); | 127 | printf (_("CRITICAL - You need more args!!!\n")); |
128 | return (NULL); | 128 | return (NULL); |
129 | } | 129 | } |
130 | 130 | ||
@@ -239,17 +239,19 @@ static int openmax = 0; | |||
239 | #define OPEN_MAX_GUESS 256 /* if OPEN_MAX is indeterminate */ | 239 | #define OPEN_MAX_GUESS 256 /* if OPEN_MAX is indeterminate */ |
240 | /* no guarantee this is adequate */ | 240 | /* no guarantee this is adequate */ |
241 | 241 | ||
242 | |||
242 | void | 243 | void |
243 | popen_timeout_alarm_handler (int signo) | 244 | popen_timeout_alarm_handler (int signo) |
244 | { | 245 | { |
245 | if (signo == SIGALRM) { | 246 | if (signo == SIGALRM) { |
246 | kill (childpid[fileno (child_process)], SIGKILL); | 247 | kill (childpid[fileno (child_process)], SIGKILL); |
247 | printf ("CRITICAL - Plugin timed out after %d seconds\n", | 248 | printf (_("CRITICAL - Plugin timed out after %d seconds\n"), |
248 | timeout_interval); | 249 | timeout_interval); |
249 | exit (STATE_CRITICAL); | 250 | exit (STATE_CRITICAL); |
250 | } | 251 | } |
251 | } | 252 | } |
252 | 253 | ||
254 | |||
253 | int | 255 | int |
254 | open_max (void) | 256 | open_max (void) |
255 | { | 257 | { |
@@ -259,14 +261,13 @@ open_max (void) | |||
259 | if (errno == 0) | 261 | if (errno == 0) |
260 | openmax = OPEN_MAX_GUESS; /* it's indeterminate */ | 262 | openmax = OPEN_MAX_GUESS; /* it's indeterminate */ |
261 | else | 263 | else |
262 | err_sys ("sysconf error for _SC_OPEN_MAX"); | 264 | err_sys (_("sysconf error for _SC_OPEN_MAX")); |
263 | } | 265 | } |
264 | } | 266 | } |
265 | return (openmax); | 267 | return (openmax); |
266 | } | 268 | } |
267 | 269 | ||
268 | 270 | ||
269 | |||
270 | /* Fatal error related to a system call. | 271 | /* Fatal error related to a system call. |
271 | * Print a message and die. */ | 272 | * Print a message and die. */ |
272 | 273 | ||
@@ -309,4 +310,3 @@ rtrim (char *str, const char *tok) | |||
309 | } | 310 | } |
310 | return str; | 311 | return str; |
311 | } | 312 | } |
312 | |||