]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: kwbimage: Print binary image offset as size
authorPali Rohár <pali@kernel.org>
Sun, 8 Jan 2023 22:27:11 +0000 (23:27 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Mar 2023 05:39:17 +0000 (06:39 +0100)
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>
tools/kwbimage.c

index eb99ac944d24073694764078776c459c15a2172b..a5de9855aa569fbf8b639216a9d7291619170e60 100644 (file)
@@ -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]);
                }
        }