[dm-devel] [PATCH v2 1/2] libmultipath: support host adapter name lookup for s390x ccw bus

Martin Wilck martin.wilck at suse.com
Tue Feb 15 20:41:52 UTC 2022


On Tue, 2022-02-15 at 21:38 +0100, Martin Wilck wrote:
> 
> I was thinking about something like this (untested):
> 
> for (parent = udev_device_get_parent(hostdev); parent; 
>      parent = udev_device_get_parent(parent)) {
>       driver_name = udev_device_get_driver(parent);
>       if (driver_name && !strcmp(driver_name, "pcieport"))
>                break;
>       subsystem_name = udev_device_get_subsystem(parent);
>       if (subsystem_name && !strcmp(subsystem_name, "ccw"))
>                break;
> }
> if (!parent) {
>        udev_device_unref(hostdev);
>        return 1;
> }
> ...

So you did exactly that in your v3. Nice!

Martin





More information about the dm-devel mailing list