[PATCH 1/3] dmesg: handle multi-char log levels
Mike Frysinger
vapier at gentoo.org
Sat Jan 5 21:17:43 UTC 2013
On Tuesday 18 December 2012 14:49:18 Peter Korsgaard wrote:
> Since Linux 3.5 (7ff9554bb5: printk: convert byte-buffer to variable-length
> record buffer), klog buffer can now contain log lines with multi-char
> loglevel indicators (<[0-9]+>) - So we can no longer just skip 3 bytes.
>
> Instead skip up to the terminating '>' like util-linux does.
doesn't seem to work
allnoconfig + dmesg + dmesg pretty enabled
$ ./busybox dmesg
>Peer 86.165.245.161:29833/59757 unexpectedly shrunk window 2138950115:2138952928 (repaired)
>Peer 86.165.245.161:29833/59757 unexpectedly shrunk window 2138950115:2138952928 (repaired)
>Peer 86.165.245.161:29833/59757 unexpectedly shrunk window 2138950115:2138952928 (repaired)
$ strace -ewrite,syslog ./busybox dmesg >/dev/null
syslog(SYSLOG_ACTION_SIZE_BUFFER, 0, 0) = 131072
syslog(SYSLOG_ACTION_READ_ALL, "<7>Peer 86.165.245.161:29833/597"..., 131072) = 285
write(1, ">Peer 86.165.245.161:29833/59757"..., 279) = 279
maybe the buf[++in] should be buf[in++]
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20130105/0205031e/attachment.asc>
More information about the busybox
mailing list