From: Lennart Poettering Date: Wed, 15 Sep 2021 13:43:42 +0000 (+0200) Subject: watchdog: pass right error code to log function so that %m works X-Git-Tag: v250-rc1~667^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a4588af942af976c55f72869340c24d5017db278;p=thirdparty%2Fsystemd.git watchdog: pass right error code to log function so that %m works --- diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c index be100931f76..b9c816760d7 100644 --- a/src/shared/watchdog.c +++ b/src/shared/watchdog.c @@ -50,8 +50,8 @@ static int update_timeout(void) { flags = WDIOS_ENABLECARD; if (ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags) < 0) { /* ENOTTY means the watchdog is always enabled so we're fine */ - log_full(ERRNO_IS_NOT_SUPPORTED(errno) ? LOG_DEBUG : LOG_WARNING, - "Failed to enable hardware watchdog: %m"); + log_full_errno(ERRNO_IS_NOT_SUPPORTED(errno) ? LOG_DEBUG : LOG_WARNING, errno, + "Failed to enable hardware watchdog, ignoring: %m"); if (!ERRNO_IS_NOT_SUPPORTED(errno)) return -errno; }