diff options
Diffstat (limited to 'ubi/flash.cpp')
| -rw-r--r-- | ubi/flash.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ubi/flash.cpp b/ubi/flash.cpp new file mode 100644 index 0000000..39015bd --- /dev/null +++ b/ubi/flash.cpp @@ -0,0 +1,29 @@ +#include "activation.hpp" +#include "config.h" + +namespace phosphor +{ +namespace software +{ +namespace updater +{ + +void Activation::flashWrite() +{ + auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH, + SYSTEMD_INTERFACE, "StartUnit"); + method.append("obmc-flash-bmc-ubirw.service", "replace"); + bus.call_noreply(method); + + auto roServiceFile = "obmc-flash-bmc-ubiro@" + versionId + ".service"; + method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH, + SYSTEMD_INTERFACE, "StartUnit"); + method.append(roServiceFile, "replace"); + bus.call_noreply(method); + + return; +} + +} // namespace updater +} // namespace software +} // namepsace phosphor |

