summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-09-15 15:43:42 +0200
committerLennart Poettering <lennart@poettering.net>2021-09-15 16:00:20 +0200
commita4588af942af976c55f72869340c24d5017db278 (patch)
treedde0ab3f625f39c426b9f749880ad93b4b0769f8 /src/shared
parentMerge pull request #20650 from fbuihuu/watchdog-rework (diff)
downloadsystemd-a4588af942af976c55f72869340c24d5017db278.tar.xz
systemd-a4588af942af976c55f72869340c24d5017db278.zip
watchdog: pass right error code to log function so that %m works
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/watchdog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c
index be100931f7..b9c816760d 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;
}