]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/manager.c
core: call watchdog_ping() unconditionally
authorFranck Bui <fbui@suse.com>
Mon, 6 Sep 2021 06:26:30 +0000 (08:26 +0200)
committerFranck Bui <fbui@suse.com>
Wed, 15 Sep 2021 08:54:24 +0000 (10:54 +0200)
commitae4a0ec45c97024387f150305ada14c9117116f4
tree430dfc71a0ef35cff1527f40a8676853bcd0d616
parent5bbf2db1e4eeabf2a36e28cf3aced0e87c4367d1
core: call watchdog_ping() unconditionally

This basically reverts commit 61927b9f116bf45bfdbf19dc2981d4a4f527ae5f and
relies on the fact that watchdog_ping() will open and setup the watchdog for us
in case the device appears later on.

Also unlike what is said in comment
https://github.com/systemd/systemd/pull/17460#pullrequestreview-517434377, both
m->watchdog[] and m->overriden_watchdog[] are not supposed to store the actual
timeout used by the watchdog device but stores the value defined by the user.

If the HW timeout value is really needed by the manager then it's probably
better to read it via an helper defined in watchdog.c instead. However the HW
timeout value is currently only needed by the watchdog code itself mainly when
it calculates the time for the next ping.
src/core/manager.c
src/core/manager.h