Harald Dunkel <harald.dunkel@t-online.de> writes:
> Juergen Kreileder wrote:
>>
>> ,----
>> | ACTION=="add", \
>> | KERNEL=="event*", \
>> | SUBSYSTEM=="input", \
>> | SYSFS{manufacturer}=="Logitech", \
>> | SYSFS{product}=="USB Receiver", \
>> | NAME="input/mx1000"
>> `----
>>
>> for my MX1000.
>>
>
> This looks very good, but ...
>
>> You can get the necessary SYSFS values with udevinfo. E.g. if
>> you're device is '/dev/input/event4' currently, then do 'udevinfo
>> -a -p /class/input/event4'.
>
> ... this command line returns just
>
> -------------------------------------------------------------------------------
> udevinfo starts with the device the node belongs to and then walks
> up the device chain, to print for every device found, all possibly
> useful attributes in the udev key format. Only attributes within
> one device section may be used together in one rule, to match the
> device for which the node will be created.
> -------------------------------------------------------------------------------
You probably gave a non-existant sysfs path to the command (see /sys).
To get the sysfs device path for a device node do:
$ udevinfo -q path -n /dev/input/event4
/class/input/input4/event4
Then you use the returned sysfs device path to get the sysfs attributes:
$ udevinfo -a -p /class/input/input4/event4
[...]
Of course you can combine the two commands:
$ udevinfo -a -p $(udevinfo -q path -n /dev/input/event4)
[...]
For udevtest you also have to use the sysfs path -- not the device node:
$ udevtest /class/input/event4
main: looking at device '/class/input/input4/event4' from subsystem 'input'
udev_rules_get_name: rule applied, 'event4' becomes 'input/mx1000'
run_program: 'inputdev.sh event4'
run_program: '/lib/udev/inputdev.sh' returned with status 0
create_node: creating device node '/dev/input/mx1000', major = '13', minor = '68', mode = '0660', uid = '0', gid = '0'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: 'udev_run_hotplugd input'
main: run: 'udev_run_devd input'
Juergen
--
Juergen Kreileder, Blackdown Java-Linux Team
http://blog.blackdown.de/
Attachment:
pgpo2OdfPfMKR.pgp
Description: PGP signature