]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
watchdog: pass right error code to log function so that %m works
authorLennart Poettering <lennart@poettering.net>
Wed, 15 Sep 2021 13:43:42 +0000 (15:43 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 15 Sep 2021 14:00:20 +0000 (16:00 +0200)
src/shared/watchdog.c

index be100931f76bcc5cee2fda744856c1f861c1fea4..b9c816760d714db6e436db92b7139818dcfb4425 100644 (file)
@@ -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;
                 }