From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Mathezer Date: Thu, 29 Jul 2004 21:56:10 +0000 Subject: symlink created to ts2 instead of mouse2 Message-Id: <4109727A.8040308@yahoo.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 am trying to get a usb mouse working with udev/hotplug. Everything works fine as long as I don't try to influence the naming. I plug the mouse in and I end up with /dev/input/mouse2 which works no problem. If however I try to symlink to the mouse, the symlink gets created to /dev/input/ts2 instead of mouse2. If I create a rule using NAME for the device, then the device gets created with the ts2 maj/min node numbers instead of the mouse2 maj/min numbers. Does anyone have any ideas for how to fix this or figure out what is going on? See relevant info below thanks -Steve This is with udev 0.30 and a 2.6.7 kernel and ii hotplug 0.0.20040329-1 Linux Hotplug Scripts ii hotplug-utils 0.0.20020114-7 Linux Hotplug utility programs My udev rule is: BUS="usb", SYSFS{product}="Microsoft 5-Button Mouse with IntelliEye(TM)", SYMLINK="input/msmouse" What I get is: total 0 drwxr-xr-x 2 root root 280 Jul 29 15:21 ./ drwxr-xr-x 7 root root 3020 Jul 29 15:40 ../ crw------- 1 root root 13, 64 Jul 29 11:22 event0 crw------- 1 root root 13, 65 Jul 29 11:22 event1 crw------- 1 root root 13, 66 Jul 29 11:22 event2 crw------- 1 root root 13, 67 Jul 29 15:21 event3 crw------- 1 root root 13, 63 Jul 29 05:22 mice crw------- 1 root root 13, 32 Jul 29 05:22 mouse0 crw------- 1 root root 13, 33 Jul 29 05:22 mouse1 crw------- 1 root root 13, 34 Jul 29 15:21 mouse2 lrwxrwxrwx 1 root root 3 Jul 29 15:21 msmouse -> ts2 crw------- 1 root root 13, 128 Jul 29 11:22 ts0 crw------- 1 root root 13, 129 Jul 29 11:22 ts1 crw------- 1 root root 13, 130 Jul 29 15:21 ts2 udevinfo -a -p /class/input/mouse2 shows the following: 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. looking at class device '/sys/class/input/mouse2': SYSFS{dev}="13:34" follow the class device's "device" looking at the device chain at '/sys/devices/pci0000:00/0000:00:1f.2/usb1/1-1/1-1:1.0': BUS="usb" ID="1-1:1.0" SYSFS{bAlternateSetting}=" 0" SYSFS{bInterfaceClass}="03" SYSFS{bInterfaceNumber}="00" SYSFS{bInterfaceProtocol}="02" SYSFS{bInterfaceSubClass}="01" SYSFS{bNumEndpoints}="01" SYSFS{detach_state}="0" SYSFS{iInterface}="00" looking at the device chain at '/sys/devices/pci0000:00/0000:00:1f.2/usb1/1-1': BUS="usb" ID="1-1" SYSFS{bConfigurationValue}="1" SYSFS{bDeviceClass}="00" SYSFS{bDeviceProtocol}="00" SYSFS{bDeviceSubClass}="00" SYSFS{bMaxPower}="100mA" SYSFS{bNumConfigurations}="1" SYSFS{bNumInterfaces}=" 1" SYSFS{bcdDevice}="0300" SYSFS{bmAttributes}="a0" SYSFS{detach_state}="0" SYSFS{devnum}="16" SYSFS{idProduct}="0039" SYSFS{idVendor}="045e" SYSFS{manufacturer}="Microsoft" SYSFS{maxchild}="0" SYSFS{product}="Microsoft 5-Button Mouse with IntelliEye(TM)" SYSFS{speed}="1.5" SYSFS{version}=" 1.10" looking at the device chain at '/sys/devices/pci0000:00/0000:00:1f.2/usb1': BUS="usb" ID="usb1" SYSFS{bConfigurationValue}="1" SYSFS{bDeviceClass}="09" SYSFS{bDeviceProtocol}="00" SYSFS{bDeviceSubClass}="00" SYSFS{bMaxPower}=" 0mA" SYSFS{bNumConfigurations}="1" SYSFS{bNumInterfaces}=" 1" SYSFS{bcdDevice}="0206" SYSFS{bmAttributes}="c0" SYSFS{detach_state}="0" SYSFS{devnum}="1" SYSFS{idProduct}="0000" SYSFS{idVendor}="0000" SYSFS{manufacturer}="Linux 2.6.7 uhci_hcd" SYSFS{maxchild}="2" SYSFS{product}="Intel Corp. 82801BA/BAM USB (Hub #1)" SYSFS{serial}="0000:00:1f.2" SYSFS{speed}="12" SYSFS{version}=" 1.10" looking at the device chain at '/sys/devices/pci0000:00/0000:00:1f.2': BUS="pci" ID="0000:00:1f.2" SYSFS{class}="0x0c0300" SYSFS{detach_state}="0" SYSFS{device}="0x2442" SYSFS{irq}="10" SYSFS{subsystem_device}="0x4541" SYSFS{subsystem_vendor}="0x8086" SYSFS{vendor}="0x8086" looking at the device chain at '/sys/devices/pci0000:00': BUS="" ID="pci0000:00" SYSFS{detach_state}="0" ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel