Emplace baseboardDev to I2C bus0
Fix issue:
FRU devices on I2C bus0 is replaced by baseboardDev,
So the FRU device on I2C bus0 could not be registed on entity
manager
Solution:
Use emplace() to add the baseboardDev to I2C bus0.
Tested:
Tested on the platform with FRU device on I2C bus0,
Use 'busctl tree xyz.openbmc_project.FruDevice' and 'ipmitool fru'
to check FRU device,both baseboardDev and FRU device on I2C bus0
could be shown.
Signed-off-by: Helen Huang <he.huang@linux.intel.com>
Change-Id: I49d37212a1c044a59c8d81694534ab6a747c7d3a
diff --git a/src/FruDevice.cpp b/src/FruDevice.cpp
index 2552242..a48854c 100644
--- a/src/FruDevice.cpp
+++ b/src/FruDevice.cpp
@@ -1382,10 +1382,7 @@
std::vector<uint8_t> baseboardFRU;
if (readBaseboardFRU(baseboardFRU))
{
- boost::container::flat_map<int, std::vector<uint8_t>>
- baseboardDev;
- baseboardDev.emplace(0, baseboardFRU);
- busmap[0] = std::make_shared<DeviceMap>(baseboardDev);
+ busmap[0]->emplace(0, baseboardFRU);
}
for (auto& devicemap : busmap)
{