Reset BootProgress and OS Status after power off
Resolves openbmc/openbmc#2131
Change-Id: I0559d378088971e3ba03bbb84111f297dd8b3514
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
diff --git a/host_state_manager.cpp b/host_state_manager.cpp
index 90c0ae5..6b13276 100644
--- a/host_state_manager.cpp
+++ b/host_state_manager.cpp
@@ -23,7 +23,9 @@
// When you see server:: or reboot:: you know we're referencing our base class
namespace server = sdbusplus::xyz::openbmc_project::State::server;
namespace reboot = sdbusplus::xyz::openbmc_project::Control::Boot::server;
-
+namespace bootprogress = sdbusplus::xyz::openbmc_project::State::Boot::server;
+namespace osstatus =
+ sdbusplus::xyz::openbmc_project::State::OperatingSystem::server;
using namespace phosphor::logging;
namespace fs = std::experimental::filesystem;
@@ -278,6 +280,8 @@
{
log<level::INFO>("Received signal that host is off");
this->currentHostState(server::Host::HostState::Off);
+ this->bootProgress(bootprogress::Progress::ProgressStages::Unspecified);
+ this->operatingSystemState(osstatus::Status::OSStatus::Inactive);
}
else if((newStateUnit == HOST_STATE_POWERON_TGT) &&