summaryrefslogtreecommitdiff
path: root/futility/file_type_rwsig.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/file_type_rwsig.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/file_type_rwsig.c')
-rw-r--r--futility/file_type_rwsig.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/futility/file_type_rwsig.c b/futility/file_type_rwsig.c
index 2990ba7c..d2d67fac 100644
--- a/futility/file_type_rwsig.c
+++ b/futility/file_type_rwsig.c
@@ -49,12 +49,12 @@ static void show_sig(const char *name, const struct vb21_signature *sig)
vb2_get_sig_algorithm_name(sig->sig_alg));
printf(" Hash Algorithm: %d %s\n", sig->hash_alg,
vb2_get_hash_algorithm_name(sig->hash_alg));
- printf(" Total size: 0x%x (%d)\n", sig->c.total_size,
+ printf(" Total size: %#x (%d)\n", sig->c.total_size,
sig->c.total_size);
printf(" ID: ");
vb2_print_bytes(&sig->id, sizeof(sig->id));
printf("\n");
- printf(" Data size: 0x%x (%d)\n", sig->data_size,
+ printf(" Data size: %#x (%d)\n", sig->data_size,
sig->data_size);
}
@@ -112,7 +112,7 @@ int ft_show_rwsig(const char *name, uint8_t *buf, uint32_t len, void *nuthin)
sig_size = fmaparea->area_size;
- VB2_DEBUG("Looking for signature at 0x%x (0x%x)\n",
+ VB2_DEBUG("Looking for signature at %#x (%#x)\n",
(uint8_t*)sig - buf, sig_size);
if (VB2_SUCCESS != vb21_verify_signature(sig, sig_size))
@@ -137,7 +137,7 @@ int ft_show_rwsig(const char *name, uint8_t *buf, uint32_t len, void *nuthin)
if (show_option.sig_size)
sig_size = show_option.sig_size;
- VB2_DEBUG("Looking for signature at 0x%x\n", len - sig_size);
+ VB2_DEBUG("Looking for signature at %#x\n", len - sig_size);
if (len < sig_size) {
VB2_DEBUG("File is too small\n");
@@ -235,7 +235,7 @@ int ft_sign_rwsig(const char *name, uint8_t *buf, uint32_t len, void *nuthin)
sig_size = fmaparea->area_size;
- VB2_DEBUG("Looking for signature at 0x%x (0x%x)\n",
+ VB2_DEBUG("Looking for signature at %#x (%#x)\n",
(uint8_t*)old_sig - buf, sig_size);
data = fmap_find_by_name(buf, len, fmap, "EC_RW",
@@ -250,7 +250,7 @@ int ft_sign_rwsig(const char *name, uint8_t *buf, uint32_t len, void *nuthin)
if (sign_option.sig_size)
sig_size = sign_option.sig_size;
- VB2_DEBUG("Looking for old signature at 0x%x\n",
+ VB2_DEBUG("Looking for old signature at %#x\n",
len - sig_size);
if (len < sig_size) {
@@ -271,7 +271,7 @@ int ft_sign_rwsig(const char *name, uint8_t *buf, uint32_t len, void *nuthin)
/* Use the same extent again */
data_size = old_sig->data_size;
- VB2_DEBUG("Found sig: data_size is 0x%x (%d)\n", data_size,
+ VB2_DEBUG("Found sig: data_size is %#x (%d)\n", data_size,
data_size);
}