mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
watchdog: pass right error code to log function so that %m works
This commit is contained in:
parent
8f8e9ad7cb
commit
a4588af942
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user