diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-16 20:15:14 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-16 20:15:14 +0200 |
commit | 0288b27ad870adc437c370c262b7b41990ae0118 (patch) | |
tree | faa0c0dd84073b77b233d933c8cd39aa1d60ccc3 /sysklogd/syslogd.c | |
parent | 89b3cbaa97d715ac27e9558ea73a1221925f589b (diff) | |
download | busybox-w32-0288b27ad870adc437c370c262b7b41990ae0118.tar.gz busybox-w32-0288b27ad870adc437c370c262b7b41990ae0118.tar.bz2 busybox-w32-0288b27ad870adc437c370c262b7b41990ae0118.zip |
small fixes atop syslog config patch
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'sysklogd/syslogd.c')
-rw-r--r-- | sysklogd/syslogd.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 0799038e9..b6f409f41 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -33,6 +33,8 @@ | |||
33 | //usage: "\n -D Drop duplicates") | 33 | //usage: "\n -D Drop duplicates") |
34 | //usage: IF_FEATURE_IPC_SYSLOG( | 34 | //usage: IF_FEATURE_IPC_SYSLOG( |
35 | //usage: "\n -C[size(KiB)] Log to shared mem buffer (read it using logread)") | 35 | //usage: "\n -C[size(KiB)] Log to shared mem buffer (read it using logread)") |
36 | //usage: IF_FEATURE_SYSLOGD_CFG( | ||
37 | //usage: "\n -f FILE Use FILE as config (default is /etc/syslog.conf)") | ||
36 | /* NB: -Csize shouldn't have space (because size is optional) */ | 38 | /* NB: -Csize shouldn't have space (because size is optional) */ |
37 | /* //usage: "\n -m MIN Minutes between MARK lines (default:20, 0=off)" */ | 39 | /* //usage: "\n -m MIN Minutes between MARK lines (default:20, 0=off)" */ |
38 | //usage: | 40 | //usage: |
@@ -284,10 +286,8 @@ static void parse_syslogdcfg(const char *file) | |||
284 | logRule_t *cur_rule; | 286 | logRule_t *cur_rule; |
285 | 287 | ||
286 | /* unexpected trailing token? */ | 288 | /* unexpected trailing token? */ |
287 | if (tok[2]) { | 289 | if (tok[2]) |
288 | t = tok[2]; | ||
289 | goto cfgerr; | 290 | goto cfgerr; |
290 | } | ||
291 | 291 | ||
292 | cur_rule = *pp_rule = xzalloc(sizeof(*cur_rule)); | 292 | cur_rule = *pp_rule = xzalloc(sizeof(*cur_rule)); |
293 | 293 | ||
@@ -307,10 +307,8 @@ static void parse_syslogdcfg(const char *file) | |||
307 | *next_selector++ = '\0'; | 307 | *next_selector++ = '\0'; |
308 | 308 | ||
309 | t = strchr(cur_selector, '.'); | 309 | t = strchr(cur_selector, '.'); |
310 | if (!t) { | 310 | if (!t) |
311 | t = cur_selector; | ||
312 | goto cfgerr; | 311 | goto cfgerr; |
313 | } | ||
314 | *t++ = '\0'; /* separate facility from priority */ | 312 | *t++ = '\0'; /* separate facility from priority */ |
315 | 313 | ||
316 | negated_prio = 0; | 314 | negated_prio = 0; |
@@ -414,7 +412,7 @@ static void parse_syslogdcfg(const char *file) | |||
414 | return; | 412 | return; |
415 | 413 | ||
416 | cfgerr: | 414 | cfgerr: |
417 | bb_error_msg_and_die("bad line %d: wrong token '%s'", parser->lineno, t); | 415 | bb_error_msg_and_die("error in '%s' at line %d", file, parser->lineno); |
418 | } | 416 | } |
419 | #endif | 417 | #endif |
420 | 418 | ||