summaryrefslogtreecommitdiff
path: root/udev/lib/libudev-monitor.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-10-15 16:55:04 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-10-15 16:55:04 +0200
commit1e61ff54f52c89c1ec0cffd595dc9b1980df2be4 (patch)
tree811d95658cbacf8ed0a8d6b4a4258be2dae3022f /udev/lib/libudev-monitor.c
parent6ebc7a4f930b14299e788da5ef89667cce005be0 (diff)
libudev: monitor - do not mangle DEVLINKS property
Diffstat (limited to 'udev/lib/libudev-monitor.c')
-rw-r--r--udev/lib/libudev-monitor.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/udev/lib/libudev-monitor.c b/udev/lib/libudev-monitor.c
index ccfcd6afc5..dd8dfac323 100644
--- a/udev/lib/libudev-monitor.c
+++ b/udev/lib/libudev-monitor.c
@@ -320,9 +320,13 @@ struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monito
} else if (strncmp(key, "DEVNAME=", 8) == 0) {
udev_device_set_devnode(udev_device, &key[8]);
} else if (strncmp(key, "DEVLINKS=", 9) == 0) {
- char *slink = &key[9];
- char *next = strchr(slink, ' ');
+ char devlinks[UTIL_PATH_SIZE];
+ char *slink;
+ char *next;
+ util_strlcpy(devlinks, &key[9], sizeof(devlinks));
+ slink = devlinks;
+ next = strchr(slink, ' ');
while (next != NULL) {
next[0] = '\0';
udev_device_add_devlink(udev_device, slink);
@@ -356,9 +360,7 @@ struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monito
udev_device_unref(udev_device);
return NULL;
}
-
udev_device_set_devnum(udev_device, makedev(maj, min));
-
udev_device_set_info_loaded(udev_device);
return udev_device;
}