diff options
author | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-05-16 14:48:47 -0700 |
---|---|---|
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-05-16 14:54:10 -0700 |
commit | 6d5b2f7e1c6e142b6198be45e3766d7d8cf5c9bc (patch) | |
tree | 398369ba8a79ba3666513d73dae4d1eda94e6254 /sensorhandler.hpp | |
parent | e004e221800a43b2569c0a337674433ffa61e7a4 (diff) | |
download | phosphor-host-ipmid-6d5b2f7e1c6e142b6198be45e3766d7d8cf5c9bc.tar.gz phosphor-host-ipmid-6d5b2f7e1c6e142b6198be45e3766d7d8cf5c9bc.zip |
Get Chassis Status should not bail if button interfaces are not present
The recent rewrite of Get Chassis Status also added support for reading
the front panel enables status instead of returning a hard-coded false.
But the implementation also errors out if the interface is not present
This makes the interfaces optional, returning false if they are not presnt
and reading them correctly if they are.
Tested-by: running ipmitool chassis status with and without the
xyz.openbmc_project.Chassis.Buttons service running:
# ipmitool chassis status
System Power : on
Power Overload : false
Power Interlock : inactive
Main Power Fault : false
Power Control Fault : false
Power Restore Policy : previous
Last Power Event :
Chassis Intrusion : inactive
Front-Panel Lockout : inactive
Drive Fault : false
Cooling/Fan Fault : false
Sleep Button Disable : not allowed
Diag Button Disable : not allowed
Reset Button Disable : allowed
Power Button Disable : allowed
Sleep Button Disabled: false
Diag Button Disabled : false
Reset Button Disabled: false
Power Button Disabled: false
# systemctl stop xyz.openbmc_project.Chassis.Buttons@0.service
# ipmitool chassis status
System Power : on
Power Overload : false
Power Interlock : inactive
Main Power Fault : false
Power Control Fault : false
Power Restore Policy : previous
Last Power Event :
Chassis Intrusion : inactive
Front-Panel Lockout : inactive
Drive Fault : false
Cooling/Fan Fault : false
Front Panel Control : none
Change-Id: If845194b6f052ba84f8b062ac4259ec66f706bb5
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Diffstat (limited to 'sensorhandler.hpp')
0 files changed, 0 insertions, 0 deletions