summaryrefslogtreecommitdiffstats
path: root/serialize.hpp
diff options
context:
space:
mode:
authorSaqib Khan <khansa@us.ibm.com>2017-08-10 15:29:34 -0500
committerMichael Tritz <mtritz@us.ibm.com>2017-08-30 12:46:12 -0500
commit1eef62de893e619a8bc0c250e0b439178da11e8f (patch)
treeb3f252891a0a6d3bbda400da819e482e9a559006 /serialize.hpp
parentb60add1e003373cbd48423d4ee60d0b580031f39 (diff)
downloadphosphor-bmc-code-mgmt-1eef62de893e619a8bc0c250e0b439178da11e8f.tar.gz
phosphor-bmc-code-mgmt-1eef62de893e619a8bc0c250e0b439178da11e8f.zip
BMC: Restore version and activation dbus objects on BMC reboot.
- Read the /media/ dir for active bmc versions. Each active version has a /etc/os-release inside /media/ which is used to recreate the version and activation objects. Resolves openbmc/openbmc#2137 Change-Id: I40e97396b0912095868172a5a6566e2189a3446b Signed-off-by: Saqib Khan <khansa@us.ibm.com>
Diffstat (limited to 'serialize.hpp')
-rw-r--r--serialize.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/serialize.hpp b/serialize.hpp
index 7b6461f..03eea99 100644
--- a/serialize.hpp
+++ b/serialize.hpp
@@ -21,8 +21,9 @@ void storeToFile(std::string versionId, uint8_t priority);
/** @brief Serialization function - restores activation information from file
* @param[in] versionId - The version for which to retrieve information.
* @param[in] priority - RedundancyPriority reference for that version.
+ * @return true if restore was successful, false if not
**/
-void restoreFromFile(std::string versionId, uint8_t& priority);
+bool restoreFromFile(std::string versionId, uint8_t& priority);
/** @brief Removes the serial file for a given version.
* @param[in] versionId - The version for which to remove a file, if it exists.
OpenPOWER on IntegriCloud