X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Fshared%2Fwatchdog.c;h=9d39beb3404deee679733c33f1d14ea43da890bc;hb=4fc42b863d4418a315faed84c180ebd16762bbfe;hp=2fe4eb81cfbeb6afcbf4dce27e5eba5cbef19f27;hpb=31e57d94c86e0a4f332f30033b10e402fec4aac7;p=elogind.git diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c index 2fe4eb81c..9d39beb34 100644 --- a/src/shared/watchdog.c +++ b/src/shared/watchdog.c @@ -60,8 +60,13 @@ static int update_timeout(void) { flags = WDIOS_ENABLECARD; r = ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags); - if (r < 0) - return log_warning_errno(errno, "Failed to enable hardware watchdog: %m"); + if (r < 0) { + /* ENOTTY means the watchdog is always enabled so we're fine */ + log_full(errno == ENOTTY ? LOG_DEBUG : LOG_WARNING, + "Failed to enable hardware watchdog: %m"); + if (errno != ENOTTY) + return -errno; + } r = ioctl(watchdog_fd, WDIOC_KEEPALIVE, 0); if (r < 0)