summaryrefslogtreecommitdiff
path: root/config/udev.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-07-22 09:09:10 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-09-01 15:26:46 +1000
commit31c71425ac13a7f554316356691a79175ea82a67 (patch)
treea25ca0632a4e52f112b79b9f8c45ee2caad8ac1a /config/udev.c
parentde0cc5a72deb7c477e368aa4fe9a713788d7ae4c (diff)
config: expose config_info as an input option.
config_info is the only reliable indicator we have in the server for duplicate devices (drivers can test for maj/min on fds as well). Don't set this after the device has been initialized but assume it's important enough to set during NIDR. This makes the option "config_info" available to the drivers as well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'config/udev.c')
-rw-r--r--config/udev.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/config/udev.c b/config/udev.c
index 993449075..cd46eec48 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -189,17 +189,14 @@ device_added(struct udev_device *udev_device)
}
}
+ add_option(&options, "config_info", config_info);
+
LogMessage(X_INFO, "config/udev: Adding input device %s (%s)\n",
name, path);
rc = NewInputDeviceRequest(options, &attrs, &dev);
if (rc != Success)
goto unwind;
- for (; dev; dev = dev->next) {
- free(dev->config_info);
- dev->config_info = strdup(config_info);
- }
-
unwind:
free(config_info);
while (!dev && (tmpo = options)) {