From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Date: Mon, 23 Apr 2007 09:03:10 +0000 Subject: Re: Excluding some device types from persistent-net (xen, s390) Message-Id: <20070423110310.764235f6@gondolin.boeblingen.de.ibm.com> List-Id: References: <200704120944.10520.zzam@gentoo.org> In-Reply-To: <200704120944.10520.zzam@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Sat, 21 Apr 2007 15:35:45 +0200, Matthias Schwarzott wrote: > > > 2. How to get the unique identifier of that ccwgroup? > > > First from a udev-rule and then from write_net_rules? > > > > Can't this simply be stripped from DEVPATH (last element)? > > As I do not know how the DEVPATH for such devices look like, some info like > udevinfo -a -p /class/net/eth? or file lists in sysfs could help. ccwgroup devices sit under a ccw driver specific root device, like /sys/devices/qeth/0.0.f5f0/ for a qeth device or /sys/devices/cu3088/0.0.7000/ for a ctc device. In any case, the network interface is like /sys/devices/qeth/0.0.f5f0/net/eth0 or /sys/devices/cu3088/0.0.7000/net/ctc0, so you should be able to use ID from the parent's parent. udevinfo -a -p /sys/class/net/ctc0/ says: looking at device '/devices/cu3088/0.0.7000/net/ctc0': KERNEL="ctc0" SUBSYSTEM="net" DRIVER="" SYSFS{weight}="0" SYSFS{tx_queue_len}="100" SYSFS{flags}="0x90" SYSFS{mtu}="32760" SYSFS{operstate}="down" SYSFS{broadcast}="" SYSFS{address}="" SYSFS{link_mode}="0" SYSFS{type}="256" SYSFS{features}="0x0" SYSFS{ifindex}="7" SYSFS{iflink}="7" SYSFS{addr_len}="0" looking at parent device '/devices/cu3088/0.0.7000/net': ID="net" BUS="" DRIVER="" looking at parent device '/devices/cu3088/0.0.7000': ID="0.0.7000" BUS="ccwgroup" DRIVER="ctc" SYSFS{stats}="0" SYSFS{loglevel}="71" SYSFS{buffer}="32768" SYSFS{type}="CTC/A" SYSFS{protocol}="0" SYSFS{online}="1" SYSFS{uevent}="DRIVER=ctc" looking at parent device '/devices/cu3088': ID="cu3088" BUS="" DRIVER="" SYSFS{uevent}="" HTH, Cornelia. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ 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