[BusyBox] bug#1147: Getting rid of date --utc

Larry Doolittle ldoolitt at recycle.lbl.gov
Thu Apr 12 19:18:25 UTC 2001


Here's my patch addressing the "problem".  I looked at
adapting klogd and syslogd to use full_version, but that
would add code size and complexity since syslog_msg and
logMessage are not printf-like.

      - Larry

diff -urN /home/ldoolitt/cvs/busybox/Makefile busybox-trial/Makefile
--- /home/ldoolitt/cvs/busybox/Makefile	Thu Apr 12 11:05:56 2001
+++ busybox-trial/Makefile	Thu Apr 12 12:13:46 2001
@@ -19,7 +19,7 @@
 
 PROG      := busybox
 VERSION   := 0.51
-BUILDTIME := $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z")
+BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z")
 export VERSION
 
 # With a modern GNU make(1) (highly recommended, that's what all the
diff -urN /home/ldoolitt/cvs/busybox/busybox.h busybox-trial/busybox.h
--- /home/ldoolitt/cvs/busybox/busybox.h	Tue Mar 27 13:53:03 2001
+++ busybox-trial/busybox.h	Thu Apr 12 12:11:20 2001
@@ -31,6 +31,8 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 
+#define BB_BANNER "BusyBox v" BB_VER " (" BB_BT ")"
+
 #ifdef DMALLOC
 #include "dmalloc.h"
 #endif
diff -urN /home/ldoolitt/cvs/busybox/klogd.c busybox-trial/klogd.c
--- /home/ldoolitt/cvs/busybox/klogd.c	Thu Apr  5 10:37:51 2001
+++ busybox-trial/klogd.c	Thu Apr 12 12:10:54 2001
@@ -76,7 +76,7 @@
 	/* "Open the log. Currently a NOP." */
 	klogctl(1, NULL, 0);
 
-	syslog_msg(LOG_DAEMON, 0, "klogd started: BusyBox v" BB_VER " (" BB_BT ")");
+	syslog_msg(LOG_DAEMON, 0, "klogd started: " BB_BANNER );
 
 	while (1) {
 		/* Use kernel syscalls */
diff -urN /home/ldoolitt/cvs/busybox/messages.c busybox-trial/messages.c
--- /home/ldoolitt/cvs/busybox/messages.c	Thu Mar 15 15:15:26 2001
+++ busybox-trial/messages.c	Thu Apr 12 12:11:14 2001
@@ -48,8 +48,7 @@
 
 
 #if defined bb_need_full_version || ! defined BB_DECLARE_EXTERN
-	BB_DEF_MESSAGE(full_version,
-	 "BusyBox v" BB_VER " (" BB_BT ") multi-call binary")
+	BB_DEF_MESSAGE(full_version, BB_BANNER " multi-call binary")
 #endif
 #if defined bb_need_name_too_long || ! defined BB_DECLARE_EXTERN
 	BB_DEF_MESSAGE(name_too_long, "file name too long")
diff -urN /home/ldoolitt/cvs/busybox/syslogd.c busybox-trial/syslogd.c
--- /home/ldoolitt/cvs/busybox/syslogd.c	Thu Apr  5 14:03:32 2001
+++ busybox-trial/syslogd.c	Thu Apr 12 12:10:39 2001
@@ -528,7 +528,7 @@
         }
         #endif
 
-	logMessage (0, "syslogd started: BusyBox v" BB_VER " (" BB_BT ")");
+	logMessage (0, "syslogd started: " BB_BANNER );
 
 	for (;;) {
 






More information about the busybox mailing list