libmultipath: avoid error messages from RDAC check
authorMartin Wilck <mwilck@suse.com>
Sun, 24 Jun 2018 19:09:44 +0000 (21:09 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 2 Jul 2018 10:03:15 +0000 (12:03 +0200)
VPD pages are only valid for SCSI devices, so we should disable
the RDAC detection for non-SCSI devices. Otherwise we'll get
an error about VPD inquiry failed.

Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/propsel.c

index f0847db..af3ed62 100644 (file)
@@ -466,6 +466,8 @@ check_rdac(struct path * pp)
        int len;
        char buff[44];
 
+       if (pp->bus != SYSFS_BUS_SCSI)
+               return 0;
        len = get_vpd_sgio(pp->fd, 0xC9, buff, 44);
        if (len <= 0)
                return 0;