]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/manager.c
watchdog: Allow the watchdog to be disabled at runtime
authorCurtis Klein <curtis.klein@hpe.com>
Fri, 5 May 2023 23:17:13 +0000 (16:17 -0700)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 1 Aug 2023 10:41:54 +0000 (11:41 +0100)
commit902ea119e2cfebf527c2d9b423514a6093d55d17
tree60cc7180666a0adc6eada5a022ffad8f5e153690
parentd8c7d6d4fe6500d7ff6722507401eabe6d5d5264
watchdog: Allow the watchdog to be disabled at runtime

manager_{get|set|override}_watchdog check the validity of the new
timeout or the overridden timeout values using timestamp_is_set which
does not recognize "0" as a valid value. However since f16890f, "0"
indicates a disabled watchdog and so is a value we should be able to
configure in order to disable the watchdog. A value of USEC_INFINITY is
considered a no-op. The behavior should be the same for all watchdog
timeout configurations (runtime, pretimeout, and shutdown).
src/core/manager.c