summaryrefslogtreecommitdiff
path: root/futility/cmd_show.c
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-10-04 17:46:29 +0800
committerCommit Bot <commit-bot@chromium.org>2019-10-23 16:28:14 +0000
commit3c477458fa7f1506e722ede38636eaced8810687 (patch)
tree6af8c80467619faa021405a72ab8c6e5eb12b55b /futility/cmd_show.c
parentffa02e80c8cec862106607ffd0333258bb1ed62e (diff)
downloadvboot-3c477458fa7f1506e722ede38636eaced8810687.tar.gz
vboot: format hex numbers with %#x instead of 0x%x
Also standardize on using hex for printing ASCII key values across vboot_ui.c and vboot_ui_menu.c. BUG=b:124141368 TEST=make clean && make runtests BRANCH=none Change-Id: Ib10288d95e29c248ebe807d99108aea75775b155 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1840191 Reviewed-by: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'futility/cmd_show.c')
-rw-r--r--futility/cmd_show.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/futility/cmd_show.c b/futility/cmd_show.c
index 544a41c1..a0e2bb62 100644
--- a/futility/cmd_show.c
+++ b/futility/cmd_show.c
@@ -62,7 +62,7 @@ static void show_keyblock(struct vb2_keyblock *keyblock, const char *name,
printf("Key block:\n");
printf(" Signature: %s\n",
sign_key ? (good_sig ? "valid" : "invalid") : "ignored");
- printf(" Size: 0x%x\n", keyblock->keyblock_size);
+ printf(" Size: %#x\n", keyblock->keyblock_size);
printf(" Flags: %d ", keyblock->keyblock_flags);
if (keyblock->keyblock_flags & VB2_KEY_BLOCK_FLAG_DEVELOPER_0)
printf(" !DEV");
@@ -320,18 +320,18 @@ int ft_show_kernel_preamble(const char *name, uint8_t *buf, uint32_t len,
}
printf("Kernel Preamble:\n");
- printf(" Size: 0x%x\n", pre2->preamble_size);
+ printf(" Size: %#x\n", pre2->preamble_size);
printf(" Header version: %u.%u\n",
pre2->header_version_major,
pre2->header_version_minor);
printf(" Kernel version: %u\n", pre2->kernel_version);
printf(" Body load address: 0x%" PRIx64 "\n",
pre2->body_load_address);
- printf(" Body size: 0x%x\n",
+ printf(" Body size: %#x\n",
pre2->body_signature.data_size);
printf(" Bootloader address: 0x%" PRIx64 "\n",
pre2->bootloader_address);
- printf(" Bootloader size: 0x%x\n", pre2->bootloader_size);
+ printf(" Bootloader size: %#x\n", pre2->bootloader_size);
uint64_t vmlinuz_header_address = 0;
uint32_t vmlinuz_header_size = 0;
@@ -341,11 +341,11 @@ int ft_show_kernel_preamble(const char *name, uint8_t *buf, uint32_t len,
if (vmlinuz_header_size) {
printf(" Vmlinuz_header address: 0x%" PRIx64 "\n",
vmlinuz_header_address);
- printf(" Vmlinuz header size: 0x%x\n",
+ printf(" Vmlinuz header size: %#x\n",
vmlinuz_header_size);
}
- printf(" Flags: 0x%x\n", vb2_kernel_get_flags(pre2));
+ printf(" Flags: %#x\n", vb2_kernel_get_flags(pre2));
/* Verify kernel body */
uint8_t *kernel_blob = 0;