typecd: Improve printing of VDOs
The VDOs are easier to read in hex format, so change the log prints to
display the VDOs in hex.
BUG=None
TEST=typecd unit tests.
Change-Id: Ic52bdd2239477de11cf294836e8189715ee43c2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2600217
Reviewed-by: Mengqi Guo <mqg@chromium.org>
Reviewed-by: Prashant Malani <pmalani@chromium.org>
Commit-Queue: Prashant Malani <pmalani@chromium.org>
Tested-by: Prashant Malani <pmalani@chromium.org>
diff --git a/typecd/peripheral.cc b/typecd/peripheral.cc
index 5f4322b..70946ac 100644
--- a/typecd/peripheral.cc
+++ b/typecd/peripheral.cc
@@ -40,27 +40,30 @@
if (!ReadHexFromPath(product, &product_vdo))
return;
- LOG(INFO) << "Peripheral Product VDO: " << product_vdo;
+ LOG(INFO) << "Peripheral Product VDO: " << std::hex << product_vdo;
if (!ReadHexFromPath(cert_stat, &cert_stat_vdo))
return;
- LOG(INFO) << "Peripheral Cert stat VDO: " << cert_stat_vdo;
+ LOG(INFO) << "Peripheral Cert stat VDO: " << std::hex << cert_stat_vdo;
if (!ReadHexFromPath(id_header, &id_header_vdo))
return;
- LOG(INFO) << "Peripheral Id Header VDO: " << id_header_vdo;
+ LOG(INFO) << "Peripheral Id Header VDO: " << std::hex << id_header_vdo;
if (!ReadHexFromPath(product_type1, &product_type_vdo1))
return;
- LOG(INFO) << "Peripheral Product Type VDO 1: " << product_type_vdo1;
+ LOG(INFO) << "Peripheral Product Type VDO 1: " << std::hex
+ << product_type_vdo1;
if (!ReadHexFromPath(product_type2, &product_type_vdo2))
return;
- LOG(INFO) << "Peripheral Product Type VDO 2: " << product_type_vdo2;
+ LOG(INFO) << "Peripheral Product Type VDO 2: " << std::hex
+ << product_type_vdo2;
if (!ReadHexFromPath(product_type3, &product_type_vdo3))
return;
- LOG(INFO) << "Peripheral Product Type VDO 3: " << product_type_vdo3;
+ LOG(INFO) << "Peripheral Product Type VDO 3: " << std::hex
+ << product_type_vdo3;
SetIdHeaderVDO(id_header_vdo);
SetProductVDO(product_vdo);