linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev: rules using multiple sysfs directories
@ 2005-04-28 19:41 James Macfarlane
  2005-04-28 20:28 ` Ian Pilcher
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: James Macfarlane @ 2005-04-28 19:41 UTC (permalink / raw)
  To: linux-hotplug

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?id\x105hix
_______________________________________________
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-04-30  0:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-28 19:41 udev: rules using multiple sysfs directories James Macfarlane
2005-04-28 20:28 ` Ian Pilcher
2005-04-28 21:44 ` Kay Sievers
2005-04-29  0:59 ` James Macfarlane
2005-04-29 12:55 ` Ian Pilcher
2005-04-29 17:13 ` James Macfarlane
2005-04-29 18:15 ` Kay Sievers
2005-04-29 20:09 ` Greg KH
2005-04-30  0:44 ` Ian Pilcher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).