cosmetic udev glitches
Peter Hutterer
peter.hutterer at who-t.net
Tue Mar 2 16:16:13 PST 2010
On Tue, Mar 02, 2010 at 02:47:22PM -0800, Dan Nicholson wrote:
> Can you try the patch below that uses the name attribute instead of the
> value from the uevent? I ran it through a little test app, but not in X.
>
> From c01a4e6dce7196a60b5247dde78054b27e004494 Mon Sep 17 00:00:00 2001
> From: Dan Nicholson <dbn.lists at gmail.com>
> Date: Tue, 2 Mar 2010 14:42:22 -0800
> Subject: [PATCH] config/udev: Get product name from attribute instead of uevent
>
> The input device product name in the kernel uevent has embedded quotes
> that aren't expected here. Use the sysfs name attribute instead, which
> does not suffer this problem.
>
> Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
> ---
> config/udev.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/config/udev.c b/config/udev.c
> index 69257e9..54306ef 100644
> --- a/config/udev.c
> +++ b/config/udev.c
> @@ -74,7 +74,7 @@ device_added(struct udev_device *udev_device)
>
> parent = udev_device_get_parent(udev_device);
> if (parent)
> - name = udev_device_get_property_value(parent, "NAME");
> + name = udev_device_get_sysattr_value(parent, "name");
> if (!name)
> name = "(unnamed)";
> else
> --
> 1.6.6.1
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
tested too.
Cheers,
Peter
More information about the xorg
mailing list