From: Zebediah Figura zfigura@codeweavers.com
The latter is not guaranteed to be equal across events, and in practice may not be. --- dlls/winebus.sys/bus_udev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 21a70d0829b..16bf30e553f 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -262,10 +262,14 @@ static struct base_device *find_device_from_fd(int fd)
static struct base_device *find_device_from_udev(struct udev_device *dev) { + const char *devnode = udev_device_get_devnode(dev); struct base_device *impl;
LIST_FOR_EACH_ENTRY(impl, &device_list, struct base_device, unix_device.entry) - if (impl->udev_device == dev) return impl; + { + if (!strcmp(impl->devnode, devnode)) + return impl; + }
return NULL; }