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
diff --git a/app/watchdog.hpp b/app/watchdog.hpp
index d52b6e6..a7ff62e 100644
--- a/app/watchdog.hpp
+++ b/app/watchdog.hpp
@@ -35,10 +35,10 @@
* - initialCountdown
* - presentCountdown
**/
-ipmi::RspType<uint8_t, // timerUse
- uint8_t, // timerAction
- uint8_t, // pretimeout
- uint8_t, // expireFlags
+ipmi::RspType<uint3_t, uint3_t, bool, bool, // timerUse
+ uint3_t, uint1_t, uint3_t, uint1_t, // timerAction
+ uint8_t, // pretimeout
+ uint8_t, // expireFlags
uint16_t, // initial Countdown - Little Endian (deciseconds)
uint16_t // present Countdown - Little Endian (deciseconds)
>