How to write this rule?

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

 



I have a device that presents itself as both a /dev/input/mouise and /dev/input/event.

The mouse:

 looking at device '/class/input/input10/mouse6':
   KERNEL=="mouse6"
   SUBSYSTEM=="input"
   DRIVER==""

 looking at parent device '/class/input/input10':
   KERNELS=="input10"
   SUBSYSTEMS=="input"
   DRIVERS==""
   ATTRS{name}=="HID 06b4:1c70"
   ATTRS{phys}=="usb-0000:00:02.1-4.4.4.4.4.1/input0"
   ATTRS{uniq}==""


The event:

 looking at device '/class/input/input10/event10':
   KERNEL=="event10"
   SUBSYSTEM=="input"
   DRIVER==""

 looking at parent device '/class/input/input10':
   KERNELS=="input10"
   SUBSYSTEMS=="input"
   DRIVERS==""
   ATTRS{name}=="HID 06b4:1c70"
   ATTRS{phys}=="usb-0000:00:02.1-4.4.4.4.4.1/input0"
   ATTRS{uniq}==""

The *only* difference between the two is the KERNEL== line. I need to create a symlink to both the mouse and the event. I tried this:

# usb remote
KERNEL=="event*", ENV{ID_CLASS}="event"
KERNEL=="input*", ENV{ID_CLASS}="input"

ENV{ID_CLASS}=="event", SUBSYSTEMS=="input", ATTRS{name}=="HID 06b4:1c70", ATTRS{phys}=="usb-0000:00:02.1-4.4.4.4.4.1/input0", \
       SYMLINK+="myth/remote", ENV{GENERATED}="1"

ENV{ID_CLASS}=="input", SUBSYSTEMS=="input", ATTRS{name}=="HID 06b4:1c70", ATTRS{phys}=="usb-0000:00:02.1-4.4.4.4.4.1/input0", \
       SYMLINK+="myth/rmouse", ENV{GENERATED}="1"


But it doesn't work. I'm unclear on how to deal with this; I need to somehow remember if I am looking at the event device or the mouse device.... But how?

Thanks,

--Yan
--
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