Skip to content

Commit

Permalink
libmultipath: don't print error message if WATCHDOG_USEC is 0
Browse files Browse the repository at this point in the history
WATCHDOG_USEC may be set to 0, which means that the watchdog
is disabled in systemd.

Fixes: 9366cfb ("multipathd: Implement systemd watchdog integration")
Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
  • Loading branch information
mwilck committed Nov 21, 2024
1 parent c994e84 commit 84a4dcc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libmultipath/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,9 @@ static void set_max_checkint_from_watchdog(struct config *conf)
unsigned long checkint;

if (envp && sscanf(envp, "%lu", &checkint) == 1) {
if (checkint == 0)
/* watchdog disabled */
return;
/* Value is in microseconds */
checkint /= 1000000;
if (checkint < 1 || checkint > UINT_MAX) {
Expand Down

0 comments on commit 84a4dcc

Please sign in to comment.