Skip to content

Commit

Permalink
bbootimg: Present an hexadecimal dump of the bootimage name
Browse files Browse the repository at this point in the history
 * Allows seeing hidden chars as hexadecimal values

Change-Id: Ie35813f75d59596d484f9aab0bc659dcf3ea8ffe
  • Loading branch information
AdrianDC committed Oct 5, 2017
1 parent 0726dd3 commit f68b50d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bbootimg.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,12 @@ static int print_info(const char *path)
printf ("* image size = %ld bytes (%.2f MB)\n", size, (double)size/0x100000);
printf (" page size = %u bytes\n\n", img.hdr.page_size);

printf ("* Boot Name = \"%s\"\n\n", name);
printf ("* Boot Name = \"%s\" [ ", name);
for (i = 0; i < BOOT_NAME_SIZE && name[i] != '\0'; ++i)
{
printf ("0x%02X ", name[i]);
}
printf ("]\n\n", name);

printf ("* kernel size = %u bytes (%.2f MB)\n", img.hdr.kernel_size, (double)img.hdr.kernel_size/0x100000);
printf (" ramdisk size = %u bytes (%.2f MB)\n", img.hdr.ramdisk_size, (double)img.hdr.ramdisk_size/0x100000);
Expand Down

0 comments on commit f68b50d

Please sign in to comment.