<font size=2 face="sans-serif">hi,</font>
<br>
<br><font size=2 face="sans-serif">When we excute 'multipath -p' with invalid
policy, get_pgpolicy_id() returns IOPOLICY_UNDEF. </font>
<br><font size=2 face="sans-serif">We should compare conf->pgpolicy_flag
with IOPOLICY_UNDEF, otherwise, it couldn't get what we want.</font>
<br><font size=2 face="sans-serif"><br>
</font>
<br><font size=2> </font><tt><font size=2>---<br>
multipath/main.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/multipath/main.c b/multipath/main.c<br>
index c33f689..af7cf5b 100644<br>
--- a/multipath/main.c<br>
+++ b/multipath/main.c<br>
@@ -532,7 +532,7 @@ main (int argc, char *argv[])<br>
break;<br>
case 'p':<br>
conf->pgpolicy_flag
= get_pgpolicy_id(optarg);<br>
-
if (conf->pgpolicy_flag == -1) {<br>
+
if (conf->pgpolicy_flag == IOPOLICY_UNDEF) {<br>
printf("'%s' is not a valid policy\n", optarg);<br>
usage(argv[0]);<br>
exit(1);<br>
-- <br>
1.9.1</font></tt><tt><font size=3><br>
</font></tt>
<br>
<br>
<br><pre><font color="blue">
--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately.
</font></pre><br>