From 84a4dccb18929038ac351b6864bff20ed95776e9 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Thu, 14 Nov 2024 15:20:24 +0100 Subject: [PATCH] libmultipath: don't print error message if WATCHDOG_USEC is 0 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 Reviewed-by: Benjamin Marzinski --- libmultipath/config.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmultipath/config.c b/libmultipath/config.c index 0e3a5cc1..226ddecb 100644 --- a/libmultipath/config.c +++ b/libmultipath/config.c @@ -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) {