summaryrefslogtreecommitdiffstats
path: root/settings.hpp
diff options
context:
space:
mode:
authorDeepak Kodihalli <dkodihal@in.ibm.com>2017-08-28 06:50:51 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-09-08 18:49:51 +0000
commit13791bd5519d2fe63a4b71f48db32e03c159369a (patch)
treeee57926ade592593fb1e83b486e411693109062d /settings.hpp
parente602709d4b95895a72d77f2cda1259c2ff9b8b1b (diff)
downloadphosphor-host-ipmid-13791bd5519d2fe63a4b71f48db32e03c159369a.tar.gz
phosphor-host-ipmid-13791bd5519d2fe63a4b71f48db32e03c159369a.zip
boot settings: use the new 'one time' setting
Resolves openbmc/openbmc#2008. Change-Id: Id79d1f61a3e627fef28b071e2a415e94de14634f Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Diffstat (limited to 'settings.hpp')
-rw-r--r--settings.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/settings.hpp b/settings.hpp
index ec1d913..91c9930 100644
--- a/settings.hpp
+++ b/settings.hpp
@@ -1,6 +1,7 @@
#pragma once
#include <string>
+#include <tuple>
#include <sdbusplus/bus.hpp>
namespace settings
@@ -49,4 +50,23 @@ struct Objects
sdbusplus::bus::bus& bus;
};
+namespace boot
+{
+
+using OneTimeEnabled = bool;
+
+/** @brief Return the one-time boot setting object path if enabled, otherwise
+ * the regular boot setting object path.
+ *
+ * @param[in] objects - const reference to an object of type Objects
+ * @param[in] iface - boot setting interface
+ *
+ * @return A tuple - boot setting object path, a bool indicating whether the
+ * returned path corresponds to the one time boot setting.
+ */
+std::tuple<Path, OneTimeEnabled> setting(const Objects& objects,
+ const Interface& iface);
+
+} // namespace boot
+
} // namespace settings
OpenPOWER on IntegriCloud