[U-Boot] [PATCH RESEND 0/2 v2] Introduce hexdump

Alexey Brodkin Alexey.Brodkin at synopsys.com
Fri Jun 10 14:42:29 CEST 2016


(Resending with real patches tagged bing v2)

This tiny series introduces functionality for either convertion a blob of data
to "hex ASCII" in memory or direct printing in stdout.

The first patch is required to safe existing users of dummy blobs
(as of today) that will become a real functions.

Note even though entire series is tagges as v2 

Cc: Stefan Roese <sr at denx.de>
Cc: Tom Rini <trini at konsulko.com>

Alexey Brodkin (2):
  linux-compat: Use original kern_levels.h for kernel debug levels
  lib: Add hexdump

Changes v1 -> v2:
 * Introduced linux/kern_levels.h so KERNEL_XXX symbols are really defined
 * Move hexdump definitions to a separate header.
 * Move helper funcions to the header so they might be used even if
   CONFIG_HEXDUMP is not enabled and if not used they will not occupy
   extra bytes of memory being "static inline" ones.
 * While at it replace its own hex_asc[], hex_asc_{lo|hi}() and
   pack_hex_byte() in lib/vsprintf.c with generic ones from hexdump.
 * In print_hex_dump() revert back first parametr for debug level,
   otherwise existing users of the function will be broken.

 include/common.h            |   1 +
 include/hexdump.h           | 108 ++++++++++++++++++++
 include/linux/compat.h      |  10 +-
 include/linux/kern_levels.h |  38 ++++++++
 lib/Kconfig                 |   5 +
 lib/Makefile                |   1 +
 lib/hexdump.c               | 233 ++++++++++++++++++++++++++++++++++++++++++++
 lib/vsprintf.c              |  17 +---
 8 files changed, 390 insertions(+), 23 deletions(-)
 create mode 100644 include/hexdump.h
 create mode 100644 include/linux/kern_levels.h
 create mode 100644 lib/hexdump.c

-- 
2.5.5



More information about the U-Boot mailing list