functions: bios-attr: Add match for PLDM
Add a match to watch for PLDM name owner change to detect when PLDM
starts. The callback would check if the new owner is set, which means
the service started instead of stopped, and then gets the properties
from entity manager to call the function that parse the json file and
sets the bios attr. If the entity manager interfaces are empty, it just
returns and the entity manager callback would take over when entity
manager starts.
This bios attr subcommand is now a vector to be able to return the two
matches, the one for EM and the new PLDM one.
Tested: Verify the bios attr was set when EM and PLDM were stopped and
EM was started then PLDM, and also having PLDM start first then EM.
Change-Id: I75fe1aae8084191226a8bd3b69087ca39ae2a43f
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/functions.hpp b/functions.hpp
index bd4007d..0cd788e 100644
--- a/functions.hpp
+++ b/functions.hpp
@@ -45,7 +45,7 @@
std::shared_ptr<void> processHostFirmware(
sdbusplus::bus::bus&, std::map<std::string, std::vector<std::string>>,
std::filesystem::path, ErrorCallbackType, sdeventplus::Event&);
-std::shared_ptr<void>
+std::vector<std::shared_ptr<void>>
updateBiosAttrTable(sdbusplus::bus::bus&,
std::map<std::string, std::vector<std::string>>,
std::filesystem::path, sdeventplus::Event&);