]> git.ipfire.org Git - thirdparty/systemd.git/commit
watchdog: make watchdog_ping() a NOP when the watchdog is disabled or closed
authorFranck Bui <fbui@suse.com>
Mon, 6 Sep 2021 06:47:08 +0000 (08:47 +0200)
committerFranck Bui <fbui@suse.com>
Wed, 15 Sep 2021 08:54:19 +0000 (10:54 +0200)
commit5bbf2db1e4eeabf2a36e28cf3aced0e87c4367d1
treeaddab97808b23bd55e57ab4b11705abc0d65f65d
parent12663295ca7fbff951c6f9747daecadc593f4c93
watchdog: make watchdog_ping() a NOP when the watchdog is disabled or closed

This patch allows watchdog_ping() to be used unconditionally regardless of
whether watchdog_set_timeout() or watchdog_close() has been previously called
or not and in both cases watchdog_ping() does nothing.

shutdown.c has been updated to cope with this change.
src/shared/watchdog.c
src/shutdown/shutdown.c