summaryrefslogtreecommitdiff
path: root/utility/tlcl_generator.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 /utility/tlcl_generator.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 'utility/tlcl_generator.c')
-rw-r--r--utility/tlcl_generator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utility/tlcl_generator.c b/utility/tlcl_generator.c
index e34542b1..99ec4a5e 100644
--- a/utility/tlcl_generator.c
+++ b/utility/tlcl_generator.c
@@ -553,15 +553,15 @@ int OutputBytes_(Command* cmd, Field* fld) {
cursor = fld->offset;
switch (fld->size) {
case 1:
- printf("0x%x, ", fld->value);
+ printf("%#x, ", fld->value);
cursor += 1;
break;
case 2:
- printf("0x%x, 0x%x, ", fld->value >> 8, fld->value & 0xff);
+ printf("%#x, %#x, ", fld->value >> 8, fld->value & 0xff);
cursor += 2;
break;
case 4:
- printf("0x%x, 0x%x, 0x%x, 0x%x, ", fld->value >> 24,
+ printf("%#x, %#x, %#x, %#x, ", fld->value >> 24,
(fld->value >> 16) & 0xff,
(fld->value >> 8) & 0xff,
fld->value & 0xff);