From e4016eb32c6fce3b3507de16961e8d60907f6776 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 29 Mar 2026 14:26:56 +0100 Subject: lbutils hexdump: reduce width on smaller integers showing the size for 64-bit high integers seems silly Signed-off-by: Leah Rowe --- util/libreboot-utils/lib/num.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'util/libreboot-utils') diff --git a/util/libreboot-utils/lib/num.c b/util/libreboot-utils/lib/num.c index bf4afaef..e13a8853 100644 --- a/util/libreboot-utils/lib/num.c +++ b/util/libreboot-utils/lib/num.c @@ -80,7 +80,10 @@ spew_hex(const void *data, size_t len) for (i = 0; i < len; i += 16) { - printf("%0*zx ", sizeof(size_t) * 2, i); + if (len <= 4294967296) /* below 4GB */ + printf("%08zx ", i); + else + printf("%0*zx ", sizeof(size_t) * 2, i); for (j = 0; j < 16; j++) { -- cgit v1.2.1