From a48b0a3af71958c1cea6389893371664a47b1a39 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 22 Oct 2003 10:56:47 +0000 Subject: 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 --- miscutils/crond.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'miscutils/crond.c') 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 { -- cgit v1.2.3-55-g6feb