OemCommands: Update biosObjPath to match Settings
Update biosObjPath to /xyz/openbmc_project/software/bios_active.
Tested:
1. Verified the BIOS version in Redfish with this change.
Request:
GET: https://<BMC_IP>/redfish/v1/UpdateService/FirmwareInventory/
bios_active
Response:
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/
bios_active",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Host image",
"Id": "bios_active",
"Members@odata.count": 1,
"Name": "Software Inventory",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Systems/system/Bios"
}
],
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": false,
"Version": "WLYDCRB1.SYS.0015.D33.2002210105"
}
2. Get OEM Device info.
Command: ipmitool raw 0x30 0x27 0x00 0xFF 0x00
Response:
20 57 4c 59 44 43 52 42 31 2e 53 59 53 2e 30 30
31 35 2e 44 33 33 2e 32 30 30 32 32 31 30 31 30
35
ASCII - WLYDCRB1.SYS.0015.D33.2002210105
Signed-off-by: Chalapathi <chalapathix.venkataramashetty@intel.com>
Change-Id: I719f14b6b7679e4386ef449adfb3d4e65b16f30f
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index 2d639fb..bd546e2 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -285,8 +285,8 @@
std::string idString((char*)data->biosId, data->biosIDLength);
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
- std::string service = getService(*dbus, biosVersionIntf, biosObjPath);
- setDbusProperty(*dbus, service, biosObjPath, biosVersionIntf,
+ std::string service = getService(*dbus, biosVersionIntf, biosActiveObjPath);
+ setDbusProperty(*dbus, service, biosActiveObjPath, biosVersionIntf,
biosVersionProp, idString);
uint8_t* bytesWritten = static_cast<uint8_t*>(response);
*bytesWritten =
@@ -363,11 +363,11 @@
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
std::string service =
- getService(*dbus, biosVersionIntf, biosObjPath);
+ getService(*dbus, biosVersionIntf, biosActiveObjPath);
try
{
Value variant =
- getDbusProperty(*dbus, service, biosObjPath,
+ getDbusProperty(*dbus, service, biosActiveObjPath,
biosVersionIntf, biosVersionProp);
std::string& idString = std::get<std::string>(variant);
if (*offset >= idString.size())