summaryrefslogtreecommitdiffstats
path: root/commands/dmesg.c
Commit message (Collapse)AuthorAgeFilesLines
* commands: dmesg: add -l option to restrict output levelOleksij Rempel2019-02-271-3/+45
| | | | | | | | | Same as linux dmesg, barebox dmesg will be able to restrict output level by using -l option. For example "dmesg -l err,warn" This functionality can be used for test automation. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: dmesg: add print raw parameterOleksij Rempel2019-02-271-2/+6
| | | | | | | | | | | | | | | | | Add -r option to mimic functionality of linux dmesg. It will prefix log level and timestamp to each buffer: <6>[ 460us] barebox 2019.02.0-00266-g6aea757067-dirty #355 Thu Feb 21 11:51:43 CET 2019 <6>[ 6279us] Board: DPTechnics DPT-Module <6>[ 209281us] mdio_bus: miibus0: probed <6>[ 210184us] ag71xx-gmac 18070000.mac@19000000.of: network device registered <6>[ 216051us] m25p80 w25q128@00: w25q128 (16384 Kbytes) <6>[ 219913us] netconsole: registered as netconsole-1 <6>[ 223312us] malloc space: 0x80c00000 -> 0x80ffffff (size 4 MiB) <6>[ 228255us] eth0: got preset MAC address: c4:93:00:00:ae:89 <6>[ 246363us] running /env/bin/init... Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: dmesg: fi format security warningMarc Kleine-Budde2015-04-031-1/+1
| | | | | | | | commands/dmesg.c: In function ‘do_dmesg’: commands/dmesg.c:71:3: warning: format not a string literal and no format arguments [-Wformat-security] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Introduce message logging supportSascha Hauer2014-09-301-0/+100
This adds a buffer for log messages and a 'dmesg' command to print the messages. The log buffer is implemented as log objects rather than a string buffer. This makes it easy to implement limiting the messages, cleaning the buffer and timestamping the messages. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>