[PATCH 1/3] libmultipath: don't print error message if WATCHDOG_USEC is 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



WATCHDOG_USEC may be set to 0, which means that the watchdog
is disabled in systemd.

Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
---
 libmultipath/config.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libmultipath/config.c b/libmultipath/config.c
index 0e3a5cc..226ddec 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) {
-- 
2.47.0





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux