bug in dmesg parameter parsing (busybox 1.2.0)

Bernhard Fischer rep.nop at aon.at
Thu Jul 6 14:38:09 UTC 2006


On Thu, Jul 06, 2006 at 03:59:12PM +0200, Natanael Copa wrote:
>Hi,
>
>I'm upgrading my 1.1.3 busybox to 1.2.0. 
>
>I got bitten by this one:
>
>~ $ dmesg -c
>dmesg: option requires an argument -- c
>BusyBox v1.2.0 (2006.07.06-06:53+0000) multi-call binary
>
>Usage: dmesg [-c] [-n LEVEL] [-s SIZE]
>
>Prints or controls the kernel ring buffer
>
>Options:
>        -c              Clears the ring buffer's contents after printing
>        -n LEVEL        Sets console logging level
>        -s SIZE         Use a buffer of size SIZE
>
>~ $ dmesg -n 1

This one just segfaulted on me.

I rewrote it, this version Works For Me (tm):
http://www.busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_scratch/util-linux/dmesg.c

HTH,
Bernhard



More information about the busybox mailing list