| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Don't hardcode grouping data into 4-byte words in print_hex_dump()
implementation and instead pass 'groupsize' to memory_display(), since
that's what that parameter is for.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
pr_memory_display is a memory_display variant that takes a MSG_*
loglevel priority with which the hexdump is printed. Like the
normal pr_* function this is optimized out when the priority is
below the compile time priority.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
It's where the kernel has the print_hex_dump prototypes aswell, it's a
better match for these.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The levels of pr_emerg() and pr_cont() are both set to 0. When pr_cont()
is used to continue a previous line, and colored console output is
enabled, this can result in garbled log messages being printed, e.g.:
ERROR: HABv4: -------- HAB warning Event 0 --------
ERROR: HABv4: event data:
ERROR: HABv4: dbEMERG: 00EMERG: 24EMERG: 42EMERG: 69EMERG: 30EMERG: e1EMERG: 1d
ERROR: HABv4: 00EMERG: 04EMERG: 00EMERG: 02EMERG: 40EMERG: 00EMERG: 36EMERG: 06
ERROR: HABv4: 55EMERG: 55EMERG: 00EMERG: 03EMERG: 00EMERG: 00EMERG: 00EMERG: 00
ERROR: HABv4: 00EMERG: 00EMERG: 00EMERG: 00EMERG: 00EMERG: 00EMERG: 00EMERG: 00
ERROR: HABv4: 00EMERG: 00EMERG: 00EMERG: 01EMERG:
ERROR: HABv4: Status: Operation completed with warning (0x69)
Note the additional "EMERG: " in front of each continuation, which is
inserted by pr_cont(buf) being expanded to pr_printk(0, buf). These
additional strings show up in deep red on the console (which is not
supported in Git commit messages…). One might argue that this is the
same color as the "ERROR: " prefix, but when pr_cont() is used with
pr_notice() and pr_warning(), which are printed in blue and yellow
respectively, at least then the change in color would lead to additional
confusion.
The log level argument to pr_printk is defined as int, so we can solve
this by defining the level for pr_cont() to -1, which is not used for
any loglevel:
ERROR: HABv4: -------- HAB warning Event 0 --------
ERROR: HABv4: event data:
ERROR: HABv4: db 00 24 42 69 30 e1 1d
ERROR: HABv4: 00 04 00 02 40 00 36 06
ERROR: HABv4: 55 55 00 03 00 00 00 00
ERROR: HABv4: 00 00 00 00 00 00 00 00
ERROR: HABv4: 00 00 00 01
ERROR: HABv4: Status: Operation completed with warning (0x69)
Fixes: 0fcefdd9369050f35a88b41dcd42cc5a3c6c6b33 ("printk: Add pr_cont")
Fixes: ea0e077ed65a003e4d7a1e023aee38cbe2d14898 ("printk: Fix pr_cont")
Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
%pV allows to pass in a struct va_format as a pointer. UBIFS uses this
for its logging functions, but it may be useful in other places aswell.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
pr_cont is meant to continue a line, so do not printf the prefix given
with pr_fmt() again.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
This is needed by upcoming UBIFS update.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
This is needed by upcoming list_sort implementation.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
There are functions or structs used that do need these.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
This adds simple console support to the PBL which makes it
possible to print more complex messages in the PBL than just
strings or hex numbers. For now puts_ll is used to print the
messages, so it depends on CONFIG_DEBUG_LL which makes it
more a debugging option. However, this could be extended later
to get regular output from the PBL if desired.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Without console support we need a static inline version of
pr_print and dev_printf, otherwise we get link errors.
Reported-by: Kevin Du Huanpeng <u74147@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
During debugging it sometimes helps to me even more verbose. This
adds an additional debug level for this. Also we remove an already
existing pr_vdebug definition in the USB gadget u_serial driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
With this the verbosity of barebox can be controlled during runtime
using the 'loglevel' globalvar.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
The level of pr_err and pr_warning were interchanged.
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
__pr_printk is a define which uses a local variable 'ret'. This
means that whenever someone does a pr_*("ret: %d\n", ret);
ret will be 0.
Fix this by writing this without a local variable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
__dev_printf is a define which uses a local variable 'ret'. This
means that whenever someone does a dev_*(dev, "ret: %d\n", ret);
ret will be 0.
Fix this by writing this without a local variable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
With this the files can give more context to their pr_* messages by
specifying a
at the beginning of the files. Basically the same mechanism as in the
Kernel.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|