summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorDenis Vlasenko2008-12-31 03:33:50 +0000
committerDenis Vlasenko2008-12-31 03:33:50 +0000
commit15c0b725849875c718b168a26e13872e163cde4c (patch)
tree687a5425953ae362ef285c6c671f09a05d3fa3c0 /init
parentccdc13d306c0a8d2735488bf8e46503f7e567767 (diff)
downloadbusybox-15c0b725849875c718b168a26e13872e163cde4c.zip
busybox-15c0b725849875c718b168a26e13872e163cde4c.tar.gz
Apply post 1.13.1 patches, bump to 1.13.21_13_2
Diffstat (limited to 'init')
-rw-r--r--init/init.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/init/init.c b/init/init.c
index 1caf45b..10f5ba6 100644
--- a/init/init.c
+++ b/init/init.c
@@ -118,18 +118,18 @@ static void message(int where, const char *fmt, ...)
msg[0] = '\r';
va_start(arguments, fmt);
- l = vsnprintf(msg + 1, sizeof(msg) - 2, fmt, arguments);
- if (l > sizeof(msg) - 2)
- l = sizeof(msg) - 2;
+ l = 1 + vsnprintf(msg + 1, sizeof(msg) - 2, fmt, arguments);
+ if (l > sizeof(msg) - 1)
+ l = sizeof(msg) - 1;
msg[l] = '\0';
va_end(arguments);
if (ENABLE_FEATURE_INIT_SYSLOG) {
- /* Log the message to syslogd */
if (where & L_LOG) {
- /* don't print out "\r" */
- openlog(applet_name, 0, LOG_DAEMON);
- syslog(LOG_INFO, "init: %s", msg + 1);
+ /* Log the message to syslogd */
+ openlog("init", 0, LOG_DAEMON);
+ /* don't print "\r" */
+ syslog(LOG_INFO, "%s", msg + 1);
closelog();
}
msg[l++] = '\n';