svn commit: trunk/busybox/init

vda at busybox.net vda at busybox.net
Mon Mar 5 19:55:30 UTC 2007


Author: vda
Date: 2007-03-05 11:55:30 -0800 (Mon, 05 Mar 2007)
New Revision: 18011

Log:
decouple INIT and SYSLOGD (patch by Eric Spakman E.Spakman at inter.nl.net)


Modified:
   trunk/busybox/init/Config.in
   trunk/busybox/init/init.c


Changeset:
Modified: trunk/busybox/init/Config.in
===================================================================
--- trunk/busybox/init/Config.in	2007-03-05 19:24:33 UTC (rev 18010)
+++ trunk/busybox/init/Config.in	2007-03-05 19:55:30 UTC (rev 18011)
@@ -38,6 +38,11 @@
 	  behavour, but is often what you want in an embedded system where
 	  the console is only accessed during development or for maintenance.
 
+config FEATURE_INIT_SYSLOG
+	bool "Enable init to write to syslog"
+	default n
+	depends on INIT
+
 config FEATURE_EXTRA_QUIET
 	bool "Be _extra_ quiet on boot"
 	default y

Modified: trunk/busybox/init/init.c
===================================================================
--- trunk/busybox/init/init.c	2007-03-05 19:24:33 UTC (rev 18010)
+++ trunk/busybox/init/init.c	2007-03-05 19:55:30 UTC (rev 18011)
@@ -16,7 +16,7 @@
 #include <sys/wait.h>
 #include <sys/reboot.h>
 
-#if ENABLE_SYSLOGD
+#if ENABLE_FEATURE_INIT_SYSLOG
 # include <sys/syslog.h>
 #endif
 
@@ -84,7 +84,7 @@
 /* Static variables */
 static struct init_action *init_action_list = NULL;
 
-#if !ENABLE_SYSLOGD
+#if !ENABLE_FEATURE_INIT_SYSLOG
 static const char *log_console = VC_5;
 #endif
 #if !ENABLE_DEBUG_INIT
@@ -144,7 +144,7 @@
 	__attribute__ ((format(printf, 2, 3)));
 static void message(int device, const char *fmt, ...)
 {
-#if !ENABLE_SYSLOGD
+#if !ENABLE_FEATURE_INIT_SYSLOG
 	static int log_fd = -1;
 #endif
 
@@ -159,7 +159,7 @@
 	msg[sizeof(msg) - 2] = '\0';
 	l = strlen(msg);
 
-#if ENABLE_SYSLOGD
+#if ENABLE_FEATURE_INIT_SYSLOG
 	/* Log the message to syslogd */
 	if (device & L_LOG) {
 		/* don't out "\r" */
@@ -285,7 +285,7 @@
 		 * if TERM is set to linux (the default) */
 		if (!s || strcmp(s, "linux") == 0)
 			putenv((char*)"TERM=vt102");
-#if !ENABLE_SYSLOGD
+#if !ENABLE_FEATURE_INIT_SYSLOG
 		log_console = NULL;
 #endif
 	} else if (!s)




More information about the busybox-cvs mailing list