Change the bios version dbus interface to align with bmcweb
bmcweb uses the software interface for bios version query in redfish,
to align with it, the settings service implements this interface,
this reference needs to be changed too
Tested:
AC cycle the system, then DC cycle the host,
BiosVersion in redfish is the correct bios version:
https://$BMCIP/redfish/v1/Systems/system
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: I90d66d2f6c24779b09b694204fdbb5c1434f37d4
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index 2697d00..1313316 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -296,8 +296,9 @@
std::string idString((char*)data->biosId, data->biosIDLength);
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
- std::string service = getService(*dbus, biosIntf, biosObjPath);
- setDbusProperty(*dbus, service, biosObjPath, biosIntf, biosProp, idString);
+ std::string service = getService(*dbus, biosVersionIntf, biosObjPath);
+ setDbusProperty(*dbus, service, biosObjPath, biosVersionIntf,
+ biosVersionProp, idString);
uint8_t* bytesWritten = static_cast<uint8_t*>(response);
*bytesWritten =
data->biosIDLength; // how many bytes are written into storage
@@ -387,11 +388,13 @@
case OEMDevEntityType::biosId:
{
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
- std::string service = getService(*dbus, biosIntf, biosObjPath);
+ std::string service =
+ getService(*dbus, biosVersionIntf, biosObjPath);
try
{
- Value variant = getDbusProperty(*dbus, service, biosObjPath,
- biosIntf, biosProp);
+ Value variant =
+ getDbusProperty(*dbus, service, biosObjPath,
+ biosVersionIntf, biosVersionProp);
std::string& idString = std::get<std::string>(variant);
if (offset >= idString.size())
{