watchdog: Don't require WDIOC_SETOPTIONS/WDIOS_ENABLECARD
authorJean Delvare <jdelvare@suse.de>
Wed, 17 Jun 2015 16:57:39 +0000 (18:57 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 17 Jun 2015 17:04:10 +0000 (19:04 +0200)
commit14f494c710bec8fcbadb5f46a9c25b9ebf367f19
tree5f39ad8423cb2c994214b2d6c2816a95843fc593
parent99cfda2f7fa540866172358db2ff059b57c3b3ea
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