libmultipath: make vpd page 0x80 optional
authorHannes Reinecke <hare@suse.de>
Mon, 16 Feb 2015 10:10:47 +0000 (11:10 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sun, 29 Mar 2015 16:23:50 +0000 (18:23 +0200)
VPD page 0x80 is optional, so we shouldn't return an error if
the page is not present.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/discovery.c

index d1a16e6..4582a20 100644 (file)
@@ -1370,13 +1370,13 @@ scsi_ioctl_pathinfo (struct path * pp, int mask)
                parent = udev_device_get_parent(parent);
        }
        if (!attr_path || pp->sg_id.host_no == -1)
-               return -ENODEV;
+               return 0;
 
        if (get_vpd_sysfs(parent, 0x80, pp->serial, SERIAL_SIZE) > 0)
                condlog(3, "%s: serial = %s",
                        pp->dev, pp->serial);
 
-       return strlen(pp->serial) ? 0 : -EIO;
+       return 0;
 }
 
 static int