summaryrefslogtreecommitdiff
path: root/udev/lib/libudev-monitor.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-09-15 17:12:47 -0700
committerKay Sievers <kay.sievers@vrfy.org>2008-09-15 17:12:47 -0700
commit8753fadf2a6ecead372e71b8bf9336cf29f9c958 (patch)
tree9032f1a046db6a757234ddc19bfcd798b04ec0a2 /udev/lib/libudev-monitor.c
parent9a8047fa290f05d0b2dcf7e7dbe8539c6e3d325e (diff)
libudev: switch API from devpath to syspath
Diffstat (limited to 'udev/lib/libudev-monitor.c')
-rw-r--r--udev/lib/libudev-monitor.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/udev/lib/libudev-monitor.c b/udev/lib/libudev-monitor.c
index 8e9cf2d0eb..f61ddb0b53 100644
--- a/udev/lib/libudev-monitor.c
+++ b/udev/lib/libudev-monitor.c
@@ -302,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) {
@@ -336,6 +340,8 @@ 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));
}
+ if (strncmp(key, "PHYSDEV", 7) == 0)
+ continue;
device_add_property_from_string(udev_device, key);
}
device_set_devnum(udev_device, makedev(maj, min));