libmultipath: Fix information not shown when first path is down.
authorGabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Mon, 5 Oct 2015 20:19:17 +0000 (17:19 -0300)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 6 Oct 2015 06:53:36 +0000 (08:53 +0200)
commitdbd131ebf584e59cb15cd524084422f1b6b192a5
treea4961968a58a30f80249666f3c7979ffc196313b
parent09f72502c0459b8deaef22df7c3303866beb5886
libmultipath: Fix information not shown when first path is down.

vendor_id and product_id information are not shown when displaying
multipath topology if the first path is down.

0QEMU_QEMU_HARDDISK_HELLOWORLD dm-0 ,      <--- Missing vendor and product
size=10G features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=0 status=active
| `- #:#:#:# -   #:#  active undef running
`-+- policy='service-time 0' prio=0 status=enabled
  `- 2:0:1:0 sdd 8:48 active undef running

This happens because we only look at the first_path when printing the
topology.  This patch looks at every slot in the path vector until we
find one with the correct value.

Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
libmultipath/print.c