This one mostly works. Syslogd seems to die after reading the following line : RAMDISK: squashfs filesystem found at block 0 <--- here ---> RAMDISK: Loading 6083 blocks [1 disk] into ram disk... done. --- ./sysklogd/syslogd.c.klogd3 2006-03-13 16:23:08.000000000 +0100 +++ ./sysklogd/syslogd.c 2006-03-13 16:57:50.000000000 +0100 @@ -746,16 +746,49 @@ j = msgptr + remain; msgend = j + i; while (j < msgend) { + int tail, bs_count, newend; + if (tmpbuf[j] != '\n') { j++; continue; } /* we have one complete message between msgptr and j */ tmpbuf[j] = 0; + + + /* Remove intermediate backspaces that might have been + * used by the kernel as a boot progress indicator. + */ + remain = tail = newend = j; + bs_count = -1; + while (--remain >= msgptr) { + if (tmpbuf[remain] == '\b') { + if (bs_count == -1) { + tail = remain + 1; + bs_count = 1; + } else + bs_count++; + } else if (bs_count >= 0) { + bs_count--; + /* we must keep the character at [remain] and + * move [tail] to [remain+1]. + */ + if (bs_count >= 0) { /* an excess of BS */ + memmove(tmpbuf + msgptr, tmpbuf + tail, newend + 1 - tail); + newend -= tail - msgptr; + } + } + } + + if (bs_count >= 0) { /* an excess of BS */ + memmove(tmpbuf + msgptr, tmpbuf + tail, newend + 1 - tail); + newend -= tail - remain; + } + memcpy(tmpbuf + msgptr - save, "kernel: ", save); serveConnection(tmpbuf + msgptr - save, - j - msgptr + save); + newend - msgptr + save); msgptr = ++j; } remain = msgend - msgptr;