Populate FRU Fields in the Chassis
This tweaks the probe a bit so that the discovered
item is the baseboard fru, allowing us to steal the
fru fields to use in the chassis.
Tested:
same as https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/22865
Change-Id: I552dbb25769a87d4cd48ac6425bae8a2b93321f9
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
index 3704f84..03d16f7 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
@@ -448,11 +448,11 @@
}
if (matchOne && ret)
{
- // match one could match multiple dbus values, which means we don't care
- // what one we found so we shouldn't be using template replace. return
- // an empty one
+ // match the last one
+ auto last = foundDevs.back();
foundDevs.clear();
- foundDevs.emplace_back(std::nullopt);
+
+ foundDevs.emplace_back(std::move(last));
}
return ret;
}