summaryrefslogtreecommitdiff
path: root/cgpt
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 /cgpt
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 'cgpt')
-rw-r--r--cgpt/cgpt_add.c2
-rw-r--r--cgpt/cgpt_show.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/cgpt/cgpt_add.c b/cgpt/cgpt_add.c
index 6134504e..e2b0b32e 100644
--- a/cgpt/cgpt_add.c
+++ b/cgpt/cgpt_add.c
@@ -63,7 +63,7 @@ static const char* DumpCgptAddParams(const CgptAddParams *params) {
StrnAppend(buf, tmp, sizeof(buf));
}
if (params->set_raw) {
- snprintf(tmp, sizeof(tmp), "-A 0x%x ", params->raw_value);
+ snprintf(tmp, sizeof(tmp), "-A %#x ", params->raw_value);
StrnAppend(buf, tmp, sizeof(buf));
}
diff --git a/cgpt/cgpt_show.c b/cgpt/cgpt_show.c
index 0a956130..c1ea2400 100644
--- a/cgpt/cgpt_show.c
+++ b/cgpt/cgpt_show.c
@@ -239,7 +239,7 @@ static int GptShow(struct drive *drive, CgptShowParams *params) {
printf("%d\n", GetLegacyBoot(drive, ANY_VALID, index));
break;
case 'A':
- printf("0x%x\n", entry->attrs.fields.gpt_att);
+ printf("%#x\n", entry->attrs.fields.gpt_att);
break;
}
} else {