diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-10-22 14:56:47 +0400 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-10-22 14:56:47 +0400 |
commit | a48b0a3af71958c1cea6389893371664a47b1a39 (patch) | |
tree | 59ed865eb6eb4b619257fc51fb19091ec5844d79 /miscutils | |
parent | 514633bf3f4f941d3ba1bb47cc46c31734574cf6 (diff) |
last_patch116 from vodz:
Stephane,
>Using busybox+uclibc, crond syslog messages look like:
>
>Oct 9 09:04:46 soekris cron.notice crond[347]: ^Icrond 2.3.2 dillon,
>started, log level 8
Thanks for testing.
>The attached patch corrects the problem.
Your patch is not correct.
Correct patch attached.
Also. Last patch have
- add "Broken pipe" message to ash.c
- busybox ash synced with dash_0.4.18
--w
vodz
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/crond.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c index 7915b860a..6de00dfde 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c @@ -114,24 +114,26 @@ static void crondlog(const char *ctl, ...) { va_list va; + const char *fmt; int level = (int)(ctl[0] & 0xf); int type = level == 20 ? LOG_ERR : ((ctl[0] & 0100) ? LOG_WARNING : LOG_NOTICE); va_start(va, ctl); + fmt = ctl+1; if (level >= LogLevel) { #ifdef FEATURE_DEBUG_OPT - if (DebugOpt) vfprintf(stderr, ctl, va); + if (DebugOpt) vfprintf(stderr, fmt, va); else #endif - if (LogFile == 0) vsyslog(type, ctl, va); + if (LogFile == 0) vsyslog(type, fmt, va); else { int logfd; if ((logfd = open(LogFile, O_WRONLY|O_CREAT|O_APPEND, 600)) >= 0) { - vdprintf(logfd, ctl, va); + vdprintf(logfd, fmt, va); close(logfd); #ifdef FEATURE_DEBUG_OPT } else { |