[PATCH 00/13] display_options: Start to unify print_buffer() and hexdump
Simon Glass
sjg at chromium.org
Wed Mar 17 19:18:27 CET 2021
At present we have two ways of showing a hex dump. Once has been in U-Boot
since the dawn of time and the other was recently added from Linux.
They both have their own unique features.
This series makes a few changes to bring them closer together. It also
adds support for logging a buffer, which is useful since it can put it
through the same log drivers as other logging output.
Also it adds tests, so we can check the behaviour.
The code-size impact of the main part of this series is 160 bytes on
Thumb2, which seems acceptable. However the final patch adds another 600
bytes or so, which is not.
Simon Glass (13):
console: Report an error when output buffer is exhausted
test: Detect when expect_str is too small
test: Convert print tests to use ut framework
test: Add a test for print_buffer()
display_options: Drop two spaces before the ASCII column
hexdump: Move API to header file
hexdump: Add support for sandbox
hexdump: Support any rowsize
hexdump: Allow ctrl-c to interrupt output
log: Drop log_nop() functions
display_options: Split print_buffer() into two functions
log: Add support for logging a buffer
RFC: display_options: Use print_hex_dump() for print_buffer()
common/console.c | 18 +-
common/log.c | 30 ++++
include/asm-generic/global_data.h | 16 +-
include/console.h | 3 +-
include/display_options.h | 25 +++
include/hexdump.h | 81 ++++++++-
include/log.h | 49 +++--
include/test/suites.h | 1 +
include/test/test.h | 4 +-
lib/display_options.c | 124 ++++++++-----
lib/hexdump.c | 104 +++--------
test/cmd/mem_search.c | 26 +--
test/cmd_ut.c | 2 +
test/dm/rtc.c | 9 +-
test/log/log_test.c | 27 +++
test/print_ut.c | 286 ++++++++++++++++++++++++------
test/ut.c | 55 +++++-
17 files changed, 628 insertions(+), 232 deletions(-)
--
2.31.0.rc2.261.g7f71774620-goog
More information about the U-Boot
mailing list