summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2023-01-08 23:27:11 +0100
committerStefan Roese <sr@denx.de>2023-03-01 06:39:17 +0100
commit63cf0d726725464ed552f5835fe96401c21c3964 (patch)
treee87d2e63d80b14523e52d1112d2f5bf585ed18c0 /tools
parent0a3a392c7122fccc1977d026cea9e48652b75688 (diff)
downloadu-boot-63cf0d726725464ed552f5835fe96401c21c3964.tar.gz
u-boot-63cf0d726725464ed552f5835fe96401c21c3964.tar.bz2
u-boot-63cf0d726725464ed552f5835fe96401c21c3964.zip
tools: kwbimage: Print binary image offset as size
Use for it pretty print function: genimg_print_size(). This makes it more human readable, like other offset and sizes printed by this tool. Signed-off-by: Pali Rohár <pali@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/kwbimage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index eb99ac944d..a5de9855aa 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
@@ -1914,9 +1914,9 @@ static void kwbimage_print_header(const void *ptr)
printf("BIN Img Size: ");
genimg_print_size(opt_hdr_v1_size(ohdr) - 12 -
4 * ohdr->data[0]);
- printf("BIN Img Offs: %08x\n",
- (unsigned)((uint8_t *)ohdr - (uint8_t *)mhdr) +
- 8 + 4 * ohdr->data[0]);
+ printf("BIN Img Offs: ");
+ genimg_print_size(((uint8_t *)ohdr - (uint8_t *)mhdr) +
+ 8 + 4 * ohdr->data[0]);
}
}