diff options
author | Wei-Cheng Xiao <garryxiao@chromium.org> | 2018-11-09 09:47:42 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-13 08:22:57 -0800 |
commit | 40b8b2bc6ffb9103c60f8fe89c9c3eebf899a0e8 (patch) | |
tree | b1bd430f01603590ab7385d9474071d6604881dc /extra | |
parent | f7414e7a5b550929f237fde54863cff2df0f6b6e (diff) | |
download | chrome-ec-40b8b2bc6ffb9103c60f8fe89c9c3eebf899a0e8.tar.gz |
gsctool: fix RO_B version number output for debug Cr50 images
For cr50 debug images, the RO_B version number format should be -1.-1.-1.
I previously changed the output format to unsigned int, which caused the
outputted version to be UINT_MAX.
BRANCH=none
BUG=b:119223356
TEST=manually run gsctool on a soraka device
$ gsctool -b cr50.dbg.prod
RO_A:0.0.10 RW_A:0.3.10[00000000:00000000:00000000] RO_B:-1.-1.-1
RW_B:0.3.10[00000000:00000000:00000000]
Signed-off-by: Wei-Cheng Xiao <garryxiao@chromium.org>
Change-Id: I5f842d4d5e50f35effbd2e5269dfd6946746acc2
Reviewed-on: https://chromium-review.googlesource.com/1328661
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'extra')
-rw-r--r-- | extra/usb_updater/gsctool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c index 526d6ba25d..31db8149ad 100644 --- a/extra/usb_updater/gsctool.c +++ b/extra/usb_updater/gsctool.c @@ -1356,13 +1356,13 @@ static int show_headers_versions(const void *image, bool show_machine_output) if (sections[i].name[1] == 'O') { // RO snprintf(ro_fw_ver[slot_idx], MAX_FW_VER_LENGTH, - "%u.%u.%u", h->epoch_, h->major_, h->minor_); + "%d.%d.%d", h->epoch_, h->major_, h->minor_); // No need to read board ID in an RO section. continue; } else { // RW snprintf(rw_fw_ver[slot_idx], MAX_FW_VER_LENGTH, - "%u.%u.%u", h->epoch_, h->major_, h->minor_); + "%d.%d.%d", h->epoch_, h->major_, h->minor_); } /* |