From 95e068216b688f00d6399a12b6172fb4f205fa5e Mon Sep 17 00:00:00 2001 From: Christophe Varoqui Date: Fri, 30 Sep 2005 10:25:06 +0200 Subject: [PATCH] [multipath] don't exit if pathvec is empty after discovery When all path fail or are removed by operator, but the maps are still present, expected behaviour is for "multipath -l" to work. IOW outs something like : xa-s05:~/scm/multipath-tools-0.4.6# multipath/multipath -l 149455400000000000000000002000000d00600000b000000 () [size=67 GB][features="0"][hwhandler="0"] \_ round-robin 0 [enabled] \_ 10:0:0:1 sdd 8:48 [active] 149455400000000000000000002000000d20600000b000000 () [size=33 GB][features="0"][hwhandler="0"] \_ round-robin 0 [enabled] \_ 10:0:0:2 sde 8:64 [active] xa-s05:~/scm/multipath-tools-0.4.6# iscsiadm -m node --logout --record=0203b2 xa-s05:~/scm/multipath-tools-0.4.6# multipath/multipath -l 149455400000000000000000002000000d00600000b000000 () [size=67 GB][features="0"][hwhandler="0"] \_ round-robin 0 [enabled] \_ #:#:#:# 8:48 [active] 149455400000000000000000002000000d20600000b000000 () [size=33 GB][features="0"][hwhandler="0"] \_ round-robin 0 [enabled] \_ #:#:#:# 8:64 [active] --- multipath/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipath/main.c b/multipath/main.c index 170bb2f..cafacae 100644 --- a/multipath/main.c +++ b/multipath/main.c @@ -994,7 +994,7 @@ main (int argc, char *argv[]) /* maximum info */ di_flag = DI_ALL; - if (path_discovery(pathvec, conf, di_flag) || VECTOR_SIZE(pathvec) == 0) + if (path_discovery(pathvec, conf, di_flag)) goto out; if (conf->verbosity > 2) { -- 2.7.4