Fixed "Watchdog Timer Use" display

- Added mask to avoid wtd_use_string overrun
This commit is contained in:
Francois Isabelle 2008-10-23 17:13:25 +00:00
parent 35daac42a5
commit 1593341ed7

View File

@ -605,7 +605,7 @@ ipmi_mc_get_watchdog(struct ipmi_intf * intf)
wdt_res = (struct ipm_get_watchdog_rsp *) rsp->data;
printf("Watchdog Timer Use: %s (0x%02x)\n",
wdt_use_string[wdt_res->timer_use], wdt_res->timer_use);
wdt_use_string[(wdt_res->timer_use & 0x07 )], wdt_res->timer_use);
printf("Watchdog Timer Is: %s\n",
wdt_res->timer_use & 0x40 ? "Started/Running" : "Stopped");
printf("Watchdog Timer Actions: %s (0x%02x)\n",