dmesg: handle multi-char log levels
authorPeter Korsgaard <jacmet@sunsite.dk>
Sat, 5 Jan 2013 23:07:17 +0000 (00:07 +0100)
committerMike Frysinger <vapier@gentoo.org>
Sun, 6 Jan 2013 02:02:14 +0000 (21:02 -0500)
commit3917fa32dce8c887d0a87d0d2f4490f1b89b51d0
tree37069276b1d94e05bf9c032985b7b214f4ae9eb5
parentfb499c57525377ca579e310d2d29c867535dd2f6
dmesg: handle multi-char log levels

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 past the terminating '>' like util-linux does.

function                                             old     new   delta
dmesg_main                                           266     280     +13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 13/0)               Total: 13 bytes

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
util-linux/dmesg.c