From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Macfarlane Date: Thu, 28 Apr 2005 19:41:56 +0000 Subject: udev: rules using multiple sysfs directories Message-Id: <200504282041.56905.typo@mcflan.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hi I'm new to this list so excuse me if this is a daft question but I've trawled the archives to no avail. I've got an example on my machine where it would be really useful if udev could look at sysfs params on multiple directory levels (see below). I know from the docs that it can't do this. As a relative udev newbie, could someone let me know why this is so ? Many thanks, James. Example ------- This seems to me to be a limitation in the following example: I often use a PS2 to USB keyboard/mouse adapter with my laptop so I can use an external keyboard and monitor. I want to generate a persistent name (so I can use a different keymap under X because it's different layout from the laptop's built-in keyboard). So, for the udev rule I need to identify it by SYSFS{product} or SYSFS{serial} or whatever. However, because the device contains two interfaces (keyboard and mouse), there are sub directories at this level in sysfs. So I need to be able to look at bInterfaceProtocol in those lower level directories as well, to tell if it's the keyboard or the mouse. Ok, I could write a shell script, or just be sensible and admit that it's unlikely I'd ever get two USB keyboards connected to one machine and use bInterfaceClass and bInterfaceProtocol together. ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix _______________________________________________ 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