klogd broken in 1.13.0?

Denys Vlasenko vda.linux at googlemail.com
Wed Nov 19 07:45:53 UTC 2008


On Wednesday 19 November 2008 05:17, Hamish Moffatt wrote:
> I just switched from busybox 1.11.2 to 1.13.0 for a project and now kernel 
> message logging seems a bit busted. It starts ok but then goes wrong.
> Application logging seems to work ok still (see the last 5 lines of this
> example).
> 
> I backed out rev 23583 and now it works again.

Does it help if you just add this one line?

                /* "2 -- Read from the log." */
                n = klogctl(2, log_buffer + used, KLOGD_LOGBUF_SIZE-1 - used);
                if (n < 0) {
                        if (errno == EINTR)
                                continue;
                        syslog(LOG_ERR, "klogd: error %d in klogctl(2): %m",
                                        errno);
                        break;
                }
+               log_buffer[used + n] = '\0';


> Viewing whole files on the busybox ViewCVS seems to be broken too eg
> http://busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_13_stable/sysklogd/klogd.c?rev=23583&view=markup

Look at trunk, not branches/busybox_1_13_stable:

http://busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/sysklogd/klogd.c?rev=23583&view=markup

--
vda



More information about the busybox mailing list