From adaa721742d565aaf6a00cdaa25db745aa6993d5 Mon Sep 17 00:00:00 2001 From: Saqib Khan Date: Thu, 23 Feb 2017 13:19:28 -0600 Subject: Add quiesce to the HOST state If the autoreboot is set to false, then the system state query will reflect quiesce state. Change-Id: I2c98646b9b97733e0cf0bd2db77f542074618a9a Signed-off-by: Saqib Khan --- host_state_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/host_state_manager.cpp b/host_state_manager.cpp index 76542d7..a7de920 100644 --- a/host_state_manager.cpp +++ b/host_state_manager.cpp @@ -44,7 +44,8 @@ constexpr auto MAPPER_INTERFACE = "xyz.openbmc_project.ObjectMapper"; /* Map a system state to the HostState */ const std::map SYS_HOST_STATE_TABLE = { {"HOST_BOOTING", server::Host::HostState::Running}, - {"HOST_POWERED_OFF", server::Host::HostState::Off} + {"HOST_POWERED_OFF", server::Host::HostState::Off}, + {"HOST_QUIESCED", server::Host::HostState::Quiesced} }; void Host::subscribeToSystemdSignals() @@ -227,6 +228,7 @@ int Host::sysStateChange(sd_bus_message* msg, else { log("Auto reboot disabled. Maintaining quiesce."); + this->currentHostState(server::Host::HostState::Quiesced); } } -- cgit v1.2.1