From e4385d640a8849209400493982e94d565aedf87b Mon Sep 17 00:00:00 2001 From: Christophe Varoqui Date: Sun, 2 Nov 2008 01:52:21 +0100 Subject: [PATCH] [lib] fix the scsi state fetching in sysfs Wrong lookup directory for the "state" node --- libmultipath/discovery.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 3bcee66..a17186b 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -543,6 +543,8 @@ path_offline (struct path * pp) parent = sysfs_device_get_parent(pp->sysdev); if (!parent) parent = pp->sysdev; + if (!strncmp(parent->kernel, "block",5)) + parent = sysfs_device_get_parent(parent); if (sysfs_get_state(parent, buff, SCSI_STATE_SIZE)) return 1; -- 2.7.4