summaryrefslogtreecommitdiffstats
path: root/ubi/item_updater_helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ubi/item_updater_helper.cpp')
-rw-r--r--ubi/item_updater_helper.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/ubi/item_updater_helper.cpp b/ubi/item_updater_helper.cpp
index 6704c21..b05291e 100644
--- a/ubi/item_updater_helper.cpp
+++ b/ubi/item_updater_helper.cpp
@@ -11,6 +11,17 @@ namespace updater
{
using namespace phosphor::logging;
+
+void Helper::setEntry(const std::string& entryId, uint8_t value)
+{
+ std::string serviceFile = "obmc-flash-bmc-setenv@" + entryId + "\\x3d" +
+ std::to_string(value) + ".service";
+ auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH,
+ SYSTEMD_INTERFACE, "StartUnit");
+ method.append(serviceFile, "replace");
+ bus.call_noreply(method);
+}
+
void Helper::clearEntry(const std::string& entryId)
{
// Remove the priority environment variable.
OpenPOWER on IntegriCloud