From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: add the physical device and the bus to the hotplug environment
Date: Thu, 04 Nov 2004 18:18:20 +0000 [thread overview]
Message-ID: <20041104181820.GA17022@kroah.com> (raw)
In-Reply-To: <20041104024428.GA17927@vrfy.org>
On Thu, Nov 04, 2004 at 03:44:28AM +0100, Kay Sievers wrote:
> Add the sysfs path of the physical device to the hotplug event of class
> and block devices. This should solve the userspace issue not to know if
> the device is a virtual one and the "device" symlink will never be created,
> but we sit there and wait for it to show up not knowing when we should
> give up.
>
> Also the bus name is added to the hotplug event, so we don't need to
> reverse lookup in the /sys/bus/* directory which bus our physical
> device belongs to. This is e.g. the value matched against the BUS= key,
> that may be used in an udev rule.
>
> This is a PCI network card:
> ACTIONd
> SUBSYSTEM=net
> DEVPATH=/class/net/eth0
> PHYSDEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:02:01.0
> PHYSDEVBUS=pci
> INTERFACE=eth0
> SEQNUM‚7
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> HOME=/
>
> This is a IDE CDROM:
> ACTIONd
> SUBSYSTEM=block
> DEVPATH=/block/hdc
> PHYSDEVPATH=/devices/pci0000:00/0000:00:1f.1/ide1/1.0
> PHYSDEVBUS=ide
> SEQNUM\x1017
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> HOME=/
>
> This is an USB-stick partition:
> ACTIONd
> SUBSYSTEM=block
> DEVPATH=/block/sda/sda1
> PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host1/target1:0:0/1:0:0:0
> PHYSDEVBUS=scsi
> SEQNUM\x1032
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> HOME=/
>
>
> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Very nice, I like this a lot. Should make userspace logic a lot simpler
now. I've applied this to my trees.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&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
prev parent reply other threads:[~2004-11-04 18:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-04 2:44 add the physical device and the bus to the hotplug environment Kay Sievers
2004-11-04 18:18 ` Greg KH [this message]
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=20041104181820.GA17022@kroah.com \
--to=greg@kroah.com \
--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).