]> git.ipfire.org Git - thirdparty/systemd.git/commit
watchdog: passing 0 to watchdog_setup now closes the watchdog
authorFranck Bui <fbui@suse.com>
Fri, 17 Sep 2021 13:16:38 +0000 (15:16 +0200)
committerFranck Bui <fbui@suse.com>
Wed, 13 Oct 2021 06:58:30 +0000 (08:58 +0200)
commitf16890f8d2e3994608274b5e46dd847d9ec3ee6a
tree12a820a66cff8049771bd86ae49abb733875a231
parentc1a08a76ab6761eee9d537c0e0fb6252a4961b14
watchdog: passing 0 to watchdog_setup now closes the watchdog

Passing 0 meant "disable the watchdog although still kept it opened". However
this case didn't seem to be useful especially since PID1 closes the device if
it is passed the nul timeout.

Hence let's change the meaning of watchdog_setup(0) to match PID1's behavior
which allows to simplify the code a bit.

Hence this patch also drops enable_watchdog().
src/core/main.c
src/core/manager.c
src/shared/watchdog.c