lib/hexdump: Allow print_hexdump() to print rowsize of 8
commit c72052b04c9e646b9fa6eb315b055797c17c9da0 Intel-BKC. Sometimes it's useful to be able to print hexdumps with widths of 8 e.g. when structures in manuals are printed that way, it's easier to do the mapping directly when looking at data. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Chen Zhuo <sagazchen@tencent.com> Signed-off-by: Xinghui Li <korantli@tencent.com>
This commit is contained in:
parent
b809466ad9
commit
96caefb6a5
|
@ -244,7 +244,7 @@ void print_hex_dump(const char *level, const char *prefix_str, int prefix_type,
|
|||
int i, linelen, remaining = len;
|
||||
unsigned char linebuf[32 * 3 + 2 + 32 + 1];
|
||||
|
||||
if (rowsize != 16 && rowsize != 32)
|
||||
if (rowsize != 8 && rowsize != 16 && rowsize != 32)
|
||||
rowsize = 16;
|
||||
|
||||
for (i = 0; i < len; i += rowsize) {
|
||||
|
|
Loading…
Reference in New Issue