Only check offline status for SCSI devices
authorHannes Reinecke <hare@suse.de>
Wed, 18 May 2011 07:32:15 +0000 (09:32 +0200)
committerHannes Reinecke <hare@suse.de>
Wed, 18 May 2011 07:32:15 +0000 (09:32 +0200)
Only SCSI devices can be checked for offline status, so we
should return PATH_UP for every other type.

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

index a7a8e94..3bcd7f9 100644 (file)
@@ -654,6 +654,9 @@ path_offline (struct path * pp)
        struct sysfs_device * parent;
        char buff[SCSI_STATE_SIZE];
 
+       if (pp->bus != SYSFS_BUS_SCSI)
+               return PATH_UP;
+
        pp->sysdev = sysfs_device_from_path(pp);
        if (!pp->sysdev) {
                condlog(1, "%s: failed to get sysfs information", pp->dev);