Some (broken) SCSI devices return an empty SCSI revision, but
this doesn't indicate a broken device. So allow for an empty
revision string when discover devices.

Signed-off-by: Hannes Reinecke <h...@suse.de>
---
 libmultipath/discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index bd65354..446c91e 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -1095,7 +1095,7 @@ scsi_sysfs_pathinfo (struct path * pp)
 
        condlog(3, "%s: product = %s", pp->dev, pp->product_id);
 
-       if (sysfs_get_rev(parent, pp->rev, SCSI_REV_SIZE) <= 0)
+       if (sysfs_get_rev(parent, pp->rev, SCSI_REV_SIZE) < 0)
                return 1;
 
        condlog(3, "%s: rev = %s", pp->dev, pp->rev);
-- 
2.6.6

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to