Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
systemd.1059
watchdog-ignore-ENOTTY.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File watchdog-ignore-ENOTTY.patch of Package systemd.1059
From: Jean Delvare <jdelvare@suse.de> Subject: watchdog: Don't require WDIOC_SETOPTIONS/WDIOS_ENABLECARD Not all watchdog drivers implement WDIOC_SETOPTIONS. Drivers which do not implement it have their device always enabled. So it's fine to report an error if WDIOS_DISABLECARD is passed and the ioctl is not implemented, however failing when WDIOS_ENABLECARD is passed and the ioctl is not implemented is not good: if the device was already enabled then WDIOS_ENABLECARD was a no-op and wasn't needed in the first place. So we can just ignore the error and continue. --- src/shared/watchdog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/src/shared/watchdog.c +++ b/src/shared/watchdog.c @@ -64,7 +64,8 @@ static int update_timeout(void) { flags = WDIOS_ENABLECARD; r = ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags); - if (r < 0) { + /* ENOTTY means the watchdog is always enabled so we're fine */ + if (r < 0 && errno != ENOTTY) { log_warning("Failed to enable hardware watchdog: %m"); return -errno; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor