cosmetic udev glitches

Thomas Jaeger thjaeger at gmail.com
Wed Mar 3 16:00:49 PST 2010


The attribute 'name' might not exist (as in the case of serial wacom
devices) and it's impossible to set it in an udev rule, I believe, so we
should at least fall back to the NAME property if the attribute is not
available.

Tom

On 03/02/2010 05:47 PM, Dan Nicholson wrote:
> On Tue, Mar 02, 2010 at 05:57:04PM +0100, Simon Thum 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.
> 
> Dan
> 
> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-config-udev-Get-product-name-from-attribute-instead-.patch
Type: text/x-patch
Size: 1183 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20100303/ef3c8142/attachment.bin>


More information about the xorg mailing list