commit e178e517afac5c66403baf564479da31b1219041 Author: Hannes Reinecke Date: Thu Mar 20 09:19:34 2008 +0100 Update discovery to work with new sysfs layout With the new sysfs layout the parent device of a block device it 'block', and only the parent of this is the 'real' parent. Signed-off-by: Hannes Reinecke diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index a85a248..30c36e5 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -550,6 +550,9 @@ sysfs_pathinfo(struct path * pp) if (!parent) parent = pp->sysdev; + if (!strncmp(parent->kernel, "block",5)) + parent = sysfs_device_get_parent(parent); + condlog(3, "%s: subsystem = %s", pp->dev, parent->subsystem); if (!strncmp(parent->subsystem, "scsi",4))