summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>2017-08-10 05:40:04 -0500
committerMarri Devender Rao <devenrao@in.ibm.com>2017-08-22 03:58:34 -0500
commita3b8d7e12b868f249bc5b6f5aac0fde75aeedf10 (patch)
tree3503acf9cee9cbbf03349b12090c76cffec1d792
parent7b90a62b4e6a94150bc7720d1a3927a90c5f0721 (diff)
downloadphosphor-state-manager-a3b8d7e12b868f249bc5b6f5aac0fde75aeedf10.tar.gz
phosphor-state-manager-a3b8d7e12b868f249bc5b6f5aac0fde75aeedf10.zip
Reset BootProgress and OS Status after power off
Resolves openbmc/openbmc#2131 Change-Id: I0559d378088971e3ba03bbb84111f297dd8b3514 Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
-rw-r--r--host_state_manager.cpp6
1 files changed, 5 insertions, 1 deletions
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 @@ namespace manager
// 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 @@ void Host::sysStateChange(sdbusplus::message::message& msg)
{
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) &&
OpenPOWER on IntegriCloud