Implement a flag to enable fallback always
On some machines we want our watchdog running as long as the
phosphor-watchdog daemon is alive. This patch adds an option to enter
fallback mode any time the watchdog expires or is set to be disabled.
Change-Id: Ic96d2f15c761aeb4e25158c5bd861076cca6497d
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/watchdog.cpp b/watchdog.cpp
index b0c7b6f..2bfd9b7 100644
--- a/watchdog.cpp
+++ b/watchdog.cpp
@@ -134,7 +134,7 @@
{
// We only re-arm the watchdog if we were already enabled and have
// a possible fallback
- if (fallback && this->enabled())
+ if (fallback && (fallback->always || this->enabled()))
{
auto interval_ms = fallback->interval;
auto interval_us = duration_cast<microseconds>(milliseconds(interval_ms));