From: Jonathan Steinert <hachi@kuiki.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: How can I specify a specific 'sub-device' of a device for udev
Date: Mon, 01 Mar 2004 16:23:40 +0000 [thread overview]
Message-ID: <4043638C.5070407@kuiki.net> (raw)
In-Reply-To: <4042D36F.9020909@kuiki.net>
Kay Sievers wrote:
> On Mon, 2004-03-01 at 07:08, Jonathan Steinert wrote:
>
>This does leave me puzzled about two things:
>>
>> 1) Why does udev have a flag to crawl up the sysfs tree (Asuming my
>> observations of udev are correct) but no flag to show the attributes of
>> only the device I specify? or only 'n' layers down for that matter?
> Do you really need this? Why?
That's not quite what I intended with the question. My observation is
that udevinfo shows you all the attributes as you walk up the tree, but
udev has no way to match attributes as you walk up the tree.
I'm not sure if this is intended to confuse people, but it most
certainly makes me think that there should be a way to match attributes
as you walk up the tree with udev, otherwise why does it show it to you?
>
>
>>2) How can I write a rule to match the usb-serial interface of a usb
>>device with a particular serial number?
>
>
>> looking at the device chain at
>>'/sys/devices/pci0000:00/0000:00:1d.2/usb2/2-1':
>> BUS="usb"
>
> ...
>
>> SYSFS{serial}="304087"
>
>
> Your serial number belongs the "usb"-device and not the virtual
> "usb-serial"-device. A match for the "hardware" behind your serial
> device should work fine:
>
> BUS="usb", SYSFS{serial}="304087", NAME="foo"
Sure, but matching this usb device does not yield me a tty.
>
> If you really need to match this particular device interface, you may
> use its bus-id:
>
> BUS="usb", ID="2-1:1.0", NAME="foo"
The bus ID is dependant on the order it was plugged into the device
chain, so this is kinda useless for detecting a particular device or
particular kind of device. Plus this is once again a usb device, not a
usb-serial device, and as such will not yield me a tty.
>
>
> hope that helps,
> Kay
>
It does help me to know that there is no (current) way to make udev do
this, however now I'd like to ask for ways to match the usb-serial
device which is on an interface of this particular usb device. This is
ultimately the problem I am trying to solve.
Thanks much,
Jonathan Steinert
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
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 prev parent reply other threads:[~2004-03-01 16:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-01 6:08 How can I specify a specific 'sub-device' of a device for udev naming? Jonathan Steinert
2004-03-01 12:36 ` How can I specify a specific 'sub-device' of a device for udev Kay Sievers
2004-03-01 16:23 ` Jonathan Steinert [this message]
2004-03-01 17:00 ` Kay Sievers
2004-03-01 23:56 ` Jonathan Steinert
2004-03-02 0:37 ` How can I specify a specific 'sub-device' of a device for udev naming? Kay Sievers
2004-03-04 7:19 ` How can I specify a specific 'sub-device' of a device for udev Jonathan Steinert
2004-03-04 19:53 ` How can I specify a specific 'sub-device' of a device for udev naming? Greg KH
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=4043638C.5070407@kuiki.net \
--to=hachi@kuiki.net \
--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).