projects
/
platform
/
upstream
/
multipath-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5f5617
)
[libmultipath] Update discovery to work with new sysfs layout
author
Hannes Reinecke
<hare@suse.de>
Thu, 20 Mar 2008 22:53:48 +0000
(23:53 +0100)
committer
Christophe Varoqui
<christophe.varoqui@free.fr>
Thu, 20 Mar 2008 22:53:48 +0000
(23:53 +0100)
With the new sysfs layout the parent device of a block device
it 'block', and only the parent of this is the 'real' parent.
libmultipath/discovery.c
patch
|
blob
|
history
diff --git
a/libmultipath/discovery.c
b/libmultipath/discovery.c
index
a85a248
..
30c36e5
100644
(file)
--- 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))