X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev%2Flib%2Flibudev-monitor.c;h=f61ddb0b533a3ffc40a7fe47fa5f0e2b9b9b6038;hb=a076080bd43d55f0d4eabc9bef2bf46c9791372f;hp=3e1731e38223948b9f99503ee65f99f3ba54227b;hpb=1c7047ea77a417f183b6b92f4f5ea3728acef79b;p=elogind.git diff --git a/udev/lib/libudev-monitor.c b/udev/lib/libudev-monitor.c index 3e1731e38..f61ddb0b5 100644 --- a/udev/lib/libudev-monitor.c +++ b/udev/lib/libudev-monitor.c @@ -33,7 +33,6 @@ #include "libudev.h" #include "libudev-private.h" -#include "../udev.h" struct udev_monitor { struct udev *udev; @@ -303,7 +302,11 @@ struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monito bufpos += keylen + 1; if (strncmp(key, "DEVPATH=", 8) == 0) { - device_set_devpath(udev_device, &key[8]); + char path[UTIL_PATH_SIZE]; + + util_strlcpy(path, udev_get_sys_path(udev_monitor->udev), sizeof(path)); + util_strlcat(path, &key[8], sizeof(path)); + device_set_syspath(udev_device, path); } else if (strncmp(key, "SUBSYSTEM=", 10) == 0) { device_set_subsystem(udev_device, &key[10]); } else if (strncmp(key, "DEVNAME=", 8) == 0) { @@ -337,7 +340,9 @@ struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monito } else if (strncmp(key, "TIMEOUT=", 8) == 0) { device_set_timeout(udev_device, strtoull(&key[8], NULL, 10)); } - device_add_property(udev_device, key); + if (strncmp(key, "PHYSDEV", 7) == 0) + continue; + device_add_property_from_string(udev_device, key); } device_set_devnum(udev_device, makedev(maj, min));