summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch
blob: 6a7b056aba03d850fb33cbef7ca2126fdc9f8abc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff --git a/app/watchdog.cpp b/app/watchdog.cpp
index 2938d23..bc5df29 100644
--- a/app/watchdog.cpp
+++ b/app/watchdog.cpp
@@ -445,23 +445,21 @@ ipmi_ret_t ipmi_app_watchdog_get(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
                     wdTimerUseToIpmiTimerUse(wd_prop.expiredTimerUse));
         }
 
+        res.expire_flags = timerUseExpirationFlags;
         if (wd_prop.enabled)
         {
             res.timer_use |= wd_running;
             res.present_countdown = htole16(wd_prop.timeRemaining / 100);
-            res.expire_flags = 0;
         }
         else
         {
             if (wd_prop.expiredTimerUse == WatchdogService::TimerUse::Reserved)
             {
                 res.present_countdown = res.initial_countdown;
-                res.expire_flags = 0;
             }
             else
             {
                 res.present_countdown = 0;
-                res.expire_flags = timerUseExpirationFlags;
             }
         }