aboutsummaryrefslogtreecommitdiff
path: root/include/hexdump.h
diff options
context:
space:
mode:
authorSimon Glass2021-05-08 07:00:03 -0600
committerTom Rini2021-06-08 11:39:09 -0400
commit5d6d2b88389a99c9e20618593e64a9dd74862c8a (patch)
treeec4b3d88f4d0f8b4a8b1060823a28ddb07ad72ea /include/hexdump.h
parent19edf139e900ed61825b32bc7a261e5f6606b8b1 (diff)
hexdump: Support any rowsize
At present print_hex_dump() only supports either 16- or 32-byte lines. With U-Boot we want to support any line length up to a maximum of 64. Update the function to support this, with 0 defaulting to 16, as with print_buffer(). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/hexdump.h')
-rw-r--r--include/hexdump.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/hexdump.h b/include/hexdump.h
index 62fce7ae7b4..b75e26025a4 100644
--- a/include/hexdump.h
+++ b/include/hexdump.h
@@ -85,7 +85,7 @@ static inline char *bin2hex(char *dst, const void *src, size_t count)
* hex_dump_to_buffer - convert a blob of data to "hex ASCII" in memory
* @buf: data blob to dump
* @len: number of bytes in the @buf
- * @rowsize: number of bytes to print per line; must be 16 or 32
+ * @rowsize: number of bytes to print per line; max 64
* @groupsize: number of bytes to print at a time (1, 2, 4, 8; default = 1)
* @linebuf: where to put the converted data
* @linebuflen: total size of @linebuf, including space for terminating NUL
@@ -120,7 +120,7 @@ int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize,
* caller supplies trailing spaces for alignment if desired
* @prefix_type: controls whether prefix of an offset, address, or none
* is printed (see enum dump_prefix_t)
- * @rowsize: number of bytes to print per line; must be 16 or 32
+ * @rowsize: number of bytes to print per line; max 64
* @groupsize: number of bytes to print at a time (1, 2, 4, 8; default = 1)
* @buf: data blob to dump
* @len: number of bytes in the @buf