[BusyBox-cvs] busybox/miscutils crond.c,1.9,1.10

Erik Andersen andersen at busybox.net
Wed Oct 22 10:56:49 UTC 2003


Update of /var/cvs/busybox/miscutils
In directory winder:/tmp/cvs-serv12416/miscutils

Modified Files:
	crond.c 
Log Message:
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



Index: crond.c
===================================================================
RCS file: /var/cvs/busybox/miscutils/crond.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- crond.c	3 Sep 2003 12:18:42 -0000	1.9
+++ crond.c	22 Oct 2003 10:56:45 -0000	1.10
@@ -114,24 +114,26 @@
 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 {




More information about the busybox-cvs mailing list