From: James Macfarlane <typo@mcflan.org>
To: linux-hotplug@vger.kernel.org
Subject: udev: rules using multiple sysfs directories
Date: Thu, 28 Apr 2005 19:41:56 +0000 [thread overview]
Message-ID: <200504282041.56905.typo@mcflan.org> (raw)
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
next reply other threads:[~2005-04-28 19:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-28 19:41 James Macfarlane [this message]
2005-04-28 20:28 ` udev: rules using multiple sysfs directories 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200504282041.56905.typo@mcflan.org \
--to=typo@mcflan.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).