Create functional association on startup
Look at /var/lib/phosphor-software-manager/pnor/ro
to determine if there is a funcitonal image, if so
create a functional association.
Resolves openbmc/openbmc#2279
Change-Id: I6e576e2e21a592a98d843eb45cdab8bba8f55192
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/item_updater.hpp b/item_updater.hpp
index 7f9a88b..1c65a1c 100755
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -91,6 +91,14 @@
*/
void freeSpace();
+ /** @brief Determine the software version id
+ * from the symlink target (e.g. /media/ro-2a1022fe).
+ *
+ * @param[in] symlinkPath - The path of the symlink.
+ * @param[out] id - The version id as a string.
+ */
+ static std::string determineId(const std::string& symlinkPath);
+
/** @brief Creates an active association to the
* newly active software image
*