X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=inline;f=udev%2Flib%2Flibudev-monitor.c;h=0dc8e10cbc68fa38d57ba43e2f30f544ab4fc3cc;hb=fb762bb928772f1923fef1e342d8ebca9bf7691f;hp=60f7bc29e504fa041a58223d29aa71ee6803ac3c;hpb=3eb46ec6ddeb31d9886ebb736d1d7b3534d2f354;p=elogind.git
diff --git a/udev/lib/libudev-monitor.c b/udev/lib/libudev-monitor.c
index 60f7bc29e..0dc8e10cb 100644
--- a/udev/lib/libudev-monitor.c
+++ b/udev/lib/libudev-monitor.c
@@ -17,8 +17,6 @@
* along with this program. If not, see .
*/
-#include "config.h"
-
#include
#include
#include
@@ -302,7 +300,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) {
@@ -336,7 +338,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));