From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Wed, 26 Feb 2003 17:04:48 +0000 Subject: Re: USB hotplug: knowing which interface you are being called for Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, Feb 26, 2003 at 04:39:36PM +0100, Duncan Sands wrote: > Greetings hotpluggers: when a USB device is plugged in (2.5), the > usb hotplugging scripts are called for each interface. I don't see a > convenient way to work out the interface number from the info passed > it, namely the path to the interface in sysfs. Any suggestions? As discussed on #kernelnewbies irc channel: basename $DEVPATH will give the interface number. Hm, you might have to search that result for a ":" and then use the number after that which is the interface number. And I'll go add endpoint info to the sysfs directory too, that should make your life easier, right? thanks, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp _______________________________________________ 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