From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Date: Fri, 31 May 2002 16:53:21 +0000 Subject: Re: Which node has the device been bound to? 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 Am Mittwoch, 29. Mai 2002 12:23 schrieb Kim Deokhwan: > Within a USB policy agent script, can we tell precisely which node the > device has been bound to? According to > Documentation/usb/usb-serial.txt: > > When the device is connected and recognized by the driver, the driver > will print to the system log, which node(s) the device has been bound > to. > > But the log message is too succint: > > May 27 10:51:11 localhost kernel: usbserial.c: Compaq iPAQ converter > now attached to ttyUSB0 (or usb/tts/0 for devfs) > > In case of one iPAQ, we can find the relevant log entry by grepping the > LAST matched line. But if two iPAQs are attached nearly at the same > time, the last matched line may not be the relevant entry because > context switching may happen between two agent scripts. > > Do you have any method that can solve it? At present I am afraid not. This is just the tip of the iceberg. Basically, even if you had that type of information, you cannot be sure that it stays valid while the script is running. You might have a look at driverfs currently under development in the 2.5 tree. It could help. In addition the hotplug script may be called without a loaded driver and there'll be no notification (outside devfs) if a driver binds to a device after the device is plugged in. Regards Oliver _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ 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