chiark / gitweb /
watchdog: Don't require WDIOC_SETOPTIONS/WDIOS_ENABLECARD
authorJean Delvare <jdelvare@suse.de>
Wed, 17 Jun 2015 16:57:39 +0000 (18:57 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:03:48 +0000 (10:03 +0100)
commit4fc42b863d4418a315faed84c180ebd16762bbfe
treef54b6faea4b1b1871f688a84b660647b3f1dd9c8
parent31e57d94c86e0a4f332f30033b10e402fec4aac7
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