diff mbox

[15/57] libmultipath: correctly display checker status

Message ID 1461755458-29225-16-git-send-email-hare@suse.de (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Hannes Reinecke April 27, 2016, 11:10 a.m. UTC
The '%d chk' message should only be used if there are active paths,
otherwise the path checker most certainly haven't been run.

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 libmultipath/print.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libmultipath/print.c b/libmultipath/print.c
index 96a1680..7fec6e9 100644
--- a/libmultipath/print.c
+++ b/libmultipath/print.c
@@ -177,7 +177,7 @@  snprint_queueing (char * buff, size_t len, struct multipath * mpp)
 		if (mpp->retry_tick > 0)
 			return snprintf(buff, len, "%i sec",
 					mpp->retry_tick);
-		else if (mpp->retry_tick == 0)
+		else if (mpp->retry_tick == 0 && mpp->nr_active > 0)
 			return snprintf(buff, len, "%i chk",
 					mpp->no_path_retry);
 		else