Determine the host software id
The id is determined by hashing the PNOR version.
For now, assume the pnor partitions are located at
/tmp/pnor. Part of openbmc/openbmc#1276. The PNOR
version is read from pnor.toc
Change-Id: Iddab7bb4ae5c350c60abf93057ddd997c97fa84c
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/version_host_software_manager.hpp b/version_host_software_manager.hpp
index d674f9c..eb970aa 100755
--- a/version_host_software_manager.hpp
+++ b/version_host_software_manager.hpp
@@ -25,10 +25,25 @@
*
* @param[in] bus - The Dbus bus object
* @param[in] objPath - The Dbus object path
+ * @param[in] versionId - The Host version identifier
*/
Version(sdbusplus::bus::bus& bus,
- const char* objPath) : VersionInherit(
- bus, objPath) {};
+ const std::string& objPath) : VersionInherit(
+ bus, (objPath).c_str()) {};
+
+ /**
+ * @brief Get the code version identifier.
+ *
+ * @return The version identifier.
+ **/
+ static std::string getVersion(const std::string& tocFilePath);
+
+ /**
+ * @brief Get the Host Version id.
+ *
+ * @return The id.
+ **/
+ static std::string getId(const std::string& version);
};
} // namespace manager