Lost last character in messages(init.c)
Aleksei Makhaloff
makhaloff at gmail.com
Tue Dec 9 17:54:31 UTC 2008
Trouble: lost the lastest character in messages(init.c)
Log example:
Low memory, forcing swapo
cannot run 'mount': Invalid argumen
The system is going down NOW
Sending SIGTERM to all processe
Sending SIGKILL to all processe
Requesting system hal
Please apply this patch.
diff -urN busybox-1.13.0.old/init/init.c busybox-1.13.0.new/init/init.c
--- busybox-1.13.0.old/init/init.c 2008-12-09 20:30:31.000000000 +0300
+++ busybox-1.13.0.new/init/init.c 2008-12-09 20:20:22.000000000 +0300
@@ -118,7 +118,7 @@
msg[0] = '\r';
va_start(arguments, fmt);
- l = vsnprintf(msg + 1, sizeof(msg) - 2, fmt, arguments);
+ l = vsnprintf(msg + 1, sizeof(msg) - 2, fmt, arguments) + 1;
if (l > sizeof(msg) - 2)
l = sizeof(msg) - 2;
msg[l] = '\0';
More information about the busybox
mailing list