diff options
author | Andrew Geissler <andrewg@us.ibm.com> | 2017-07-21 11:58:04 -0500 |
---|---|---|
committer | Andrew Geissler <andrewg@us.ibm.com> | 2017-07-21 11:58:04 -0500 |
commit | 8cf2f9a154665c94da59a734f0ef683397081c54 (patch) | |
tree | 2acf67c8679ca3208fc416a084803e1f7ddf4d01 | |
parent | 181f8364f81fc8864e9ae86f28de13f80cd9bbf9 (diff) | |
download | phosphor-state-manager-8cf2f9a154665c94da59a734f0ef683397081c54.tar.gz phosphor-state-manager-8cf2f9a154665c94da59a734f0ef683397081c54.zip |
Use the new hard power off target for chassis off requests
This will ensure the system is immedidately powered
off when a chassis off request is issued
Resolves openbmc/openbmc#1933
Change-Id: I7a6ab93e3b8e1f2b4e590cafc926775b989f107b
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
-rw-r--r-- | chassis_state_manager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chassis_state_manager.cpp b/chassis_state_manager.cpp index e1a2e0f..9c771bd 100644 --- a/chassis_state_manager.cpp +++ b/chassis_state_manager.cpp @@ -15,6 +15,7 @@ namespace server = sdbusplus::xyz::openbmc_project::State::server; using namespace phosphor::logging; constexpr auto CHASSIS_STATE_POWEROFF_TGT = "obmc-chassis-poweroff@0.target"; +constexpr auto CHASSIS_STATE_HARD_POWEROFF_TGT = "obmc-chassis-hard-poweroff@0.target"; constexpr auto CHASSIS_STATE_POWERON_TGT = "obmc-chassis-poweron@0.target"; constexpr auto ACTIVE_STATE = "active"; @@ -23,7 +24,8 @@ constexpr auto ACTIVATING_STATE = "activating"; /* Map a transition to it's systemd target */ const std::map<server::Chassis::Transition,std::string> SYSTEMD_TARGET_TABLE = { - {server::Chassis::Transition::Off, CHASSIS_STATE_POWEROFF_TGT}, + // Use the hard off target to ensure we shutdown immediately + {server::Chassis::Transition::Off, CHASSIS_STATE_HARD_POWEROFF_TGT}, {server::Chassis::Transition::On, CHASSIS_STATE_POWERON_TGT} }; |