Retrieve FW version from IMG_BUILTIN_DIR
Added method to retrieve firmware level found in IMG_BUILTIN_DIR. This
is required behavior on some systems types.
Tested:
Installed openbmc image on system and verified the function returns
the version available in IMG_BUILT_DIR.
Change-Id: I10166a1412fb9de421bd304c40916a81c1ca0558
Signed-off-by: Faisal Awada <faisal@us.ibm.com>
diff --git a/src/item_updater.hpp b/src/item_updater.hpp
index bc8930e..e07aca8 100644
--- a/src/item_updater.hpp
+++ b/src/item_updater.hpp
@@ -201,6 +201,16 @@
*/
void processPSUImageAndSyncToLatest();
+ /** @brief Retrieve FW version from IMG_DIR_BUILTIN
+ *
+ * This function retrieves the firmware version from the PSU model directory
+ * that is in the IMG_DIR_BUILTIN. It loops through the activations map to
+ * find matching path starts with IMG_DIR_BUILTIN, then gets the
+ * corresponding version ID, and then looks it up in the versions map to
+ * retrieve the associated version string.
+ */
+ std::string getFWVersionFromBuiltinDir();
+
/** @brief Persistent sdbusplus D-Bus bus connection. */
sdbusplus::bus_t& bus;