[BusyBox] init syslog messages have ^M

Hiroshi Ito ito at mlb.co.jp
Thu Nov 25 06:09:51 UTC 2004


Hello,

From: "Brian T" <btuch at usa.net>
Subject: Re: [BusyBox] init syslog messages have ^M
Date: Wed, 24 Nov 2004 12:55:40 -0600
Message-Id: <211001c4d257$3238d6b0$fd0ba8c0 at briantpc>
> I'm doing some testing now.  In the function "static void message()" there
> is a line msg[0] = '\r'; which is prolly it.  I'm lookin to get rid of it.
> 
> -Brian

I had same problem, and I changes source as attached patch.
I'm using busybox with this patch for a month,
It works fine.

This is minimum fix.

Maybe author thinks, 
When using console, He want to see messages on new line.

But I think, at least when SYSLOG is enabled, we do not need
to put a log to console.
that is why I did not send this patch.
--------
Hiroshi Ito
Media Lab. Inc.,
URL http://www.mlb.co.jp ( Sorry, Japanese only. )
TEL +81-3-5294-7255  FAX +81-3-5294-7256
-------------- next part --------------
diff -uNr busybox.cvs/init/init.c busybox/init/init.c
--- busybox.cvs/init/init.c	2004-11-24 15:46:20.294925647 +0900
+++ busybox/init/init.c	2004-10-13 16:49:51.000000000 +0900
@@ -226,7 +226,7 @@
 	if (device & LOG) {
 		/* don`t out "\r\n" */
 		openlog(bb_applet_name, 0, LOG_DAEMON);
-		syslog(LOG_INFO, "%s", msg);
+		syslog(LOG_INFO, "%s", msg+1);
 		closelog();
 	}
 


More information about the busybox mailing list