From: Kay Sievers Date: Thu, 26 May 2011 15:39:32 +0000 (+0200) Subject: path_id: allow to be asked about usb_devices not only usb_interfaces X-Git-Tag: 174~114 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=3821339d2d0f515313b31f0b7e9bd158626e2bec path_id: allow to be asked about usb_devices not only usb_interfaces --- diff --git a/extras/path_id/path_id.c b/extras/path_id/path_id.c index 62d26d8c4..683f78d26 100644 --- a/extras/path_id/path_id.c +++ b/extras/path_id/path_id.c @@ -355,7 +355,9 @@ static struct udev_device *handle_usb(struct udev_device *parent, char **path) const char *port; devtype = udev_device_get_devtype(parent); - if (devtype == NULL || strcmp(devtype, "usb_interface") != 0) + if (devtype == NULL) + return parent; + if (strcmp(devtype, "usb_interface") != 0 && strcmp(devtype, "usb_device") != 0) return parent; str = udev_device_get_sysname(parent);