diff options
author | Yong Li <yong.b.li@linux.intel.com> | 2019-09-29 14:18:07 +0800 |
---|---|---|
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-10-11 15:27:52 +0000 |
commit | 4dd71af3d5262064c8d8700825f8cb4d616b5fa7 (patch) | |
tree | 7c8f4cff5dfcdcba828099993a9787bffda70977 /app/watchdog_service.cpp | |
parent | 449f2166f951a650bef8634b573d6306a6ed378c (diff) | |
download | phosphor-host-ipmid-4dd71af3d5262064c8d8700825f8cb4d616b5fa7.tar.gz phosphor-host-ipmid-4dd71af3d5262064c8d8700825f8cb4d616b5fa7.zip |
Data checking fix for watchdog set/get commands
data length check for timeout action and byte 1 reserved field check
are missing, causing not to throw the error;
Log flags is on bit 7, also needs to right-shift this flag;
This commit fixes these issues;
Tested:
Set different timer use/actions:
ipmitool raw 0x06 0x24 0x85 0x0 0x0 0x0 0x64 0x00
ipmitool raw 0x06 0x24 0x84 0x1 0x0 0x0 0x64 0x00
Check the settings are correct:
ipmitool raw 0x06 0x25
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: Ia4226bb4597d2c670f93522aa763e43d15eb6cf1
Diffstat (limited to 'app/watchdog_service.cpp')
-rw-r--r-- | app/watchdog_service.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp index 0eedf1b..a929cb6 100644 --- a/app/watchdog_service.cpp +++ b/app/watchdog_service.cpp @@ -80,6 +80,8 @@ WatchdogService::Properties WatchdogService::getProperties() std::get<std::string>(properties.at("ExpireAction"))); wd_prop.timerUse = Watchdog::convertTimerUseFromString( std::get<std::string>(properties.at("CurrentTimerUse"))); + wd_prop.expiredTimerUse = Watchdog::convertTimerUseFromString( + std::get<std::string>(properties.at("ExpiredTimerUse"))); wd_prop.interval = std::get<uint64_t>(properties.at("Interval")); wd_prop.timeRemaining = |