ItemUpdater: Validate PNOR squashfs image
- Validate the image dir by checking its content.
- Set Activation to "Ready" if validation passed or
else set it to "Invalid".
Resolves openbmc/openbmc#1356
Change-Id: Ica73ae5604e74db11cd58c223d82265309ea76a6
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/item_updater.hpp b/item_updater.hpp
index 5afb96d..8e79d1d 100755
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -61,6 +61,14 @@
*/
static std::string getExtendedVersion(const std::string&
manifestFilePath);
+ /**
+ * @brief Validates the presence of SquashFS iamge in the image dir.
+ *
+ * @param[in] versionId - The software version ID.
+ * @param[out] result - 0 --> if validation was successful
+ * - -1--> Otherwise
+ */
+ static int validateSquashFSImage(const std::string& versionId);
/** @brief Persistent sdbusplus DBus bus connection. */
sdbusplus::bus::bus& busItem;