Re: Use GROUP= in a rule matching an interface of the device?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/9/9 Kay Sievers <kay.sievers@xxxxxxxx>:
> On Thu, Sep 9, 2010 at 11:21, Ludovic Rousseau
> <ludovic.rousseau@xxxxxxxxx> wrote:
>> I am trying to write a udev configuration file to change the group
>> ownership of the device if the device contains a CCID interface
>> (bInterfaceClass = 11 or 0x0B).
>>
>> I would like to use something like:
>> ATTR{bInterfaceClass}=="0b", GROUP="pcscd"
>> but that does not work.
>
> That not possible. Udev can only match on properties of the device
> ATTR or a parent device ATTRS.
>
> The device node you want to set the group to is the usb_device, but
> the match you want to do is on the usb_interface. At the moment the
> usb_device event is handled, the usb_interface does not exist, so this
> can never match. And from the usb_interface, which is a children and
> comes after the usb_device, you can not change the parent device node.
>
> Udev parses the usb descriptors and makes them available in a
> property. That's the only way to access usb_interface properties from
> the usb_device event.
>
> Something like:
>  SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}="*:0b0000:*", GROUP= ...
> should do it.

It works but is not what I need.
- Why do you use = instead of == for ENV{ID_USB_INTERFACES}? I want to
check the value of ID_USB_INTERFACES, not set it.
- Why use "*" in "*:0b0000:*"?

Instead I used a ==
SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:0b0000:*", GROUP="pcscd"
or
SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}==":0b0000:", GROUP="pcscd"
But it does not work :-(

So I still have no working solution (except using RUN+=)

Thanks

-- 
 Dr. Ludovic Rousseau
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux