From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yan Seiner Date: Tue, 10 Feb 2009 15:19:32 +0000 Subject: How to write this rule? Message-Id: <49919B04.6040209@seiner.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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