i2c-vr: use hexadecimal format for version instead of decimal
Testd on Harma:
```
curl --silent $creds https://$bmc/redfish/v1/UpdateService/FirmwareInventory/Harma_MB_VR_cpu0_pvdd11_7313
```
```
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Harma_MB_VR_cpu0_pvdd11_7313",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Unknown image",
"Id": "Harma_MB_VR_cpu0_pvdd11_7313",
"Name": "Software Inventory",
"Status": {
"Health": "Warning",
"HealthRollup": "OK",
"State": "Disabled"
},
"Updateable": true,
"Version": "EA79EAEE"
}
```
Change-Id: Ic7aa4216b8b27159a76af0c5116b784543c1f46b
Signed-off-by: Kevin Tung <kevin.wtmh@gmail.com>
diff --git a/i2c-vr/i2cvr_software_manager.cpp b/i2c-vr/i2cvr_software_manager.cpp
index 2c85da8..f1df77b 100644
--- a/i2c-vr/i2cvr_software_manager.cpp
+++ b/i2c-vr/i2cvr_software_manager.cpp
@@ -88,7 +88,7 @@
co_return false;
}
- software->setVersion(std::to_string(sum));
+ software->setVersion(std::format("{:X}", sum));
std::set<RequestedApplyTimes> allowedApplyTime = {
RequestedApplyTimes::Immediate, RequestedApplyTimes::OnReset};