From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Fri, 23 Jan 2004 01:42:55 +0000 Subject: Re: how to determine physical bus of a device and find it there Message-Id: <20040123014255.GG16052@kroah.com> List-Id: References: <20040120025230.GA26199@vrfy.org> In-Reply-To: <20040120025230.GA26199@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, Jan 23, 2004 at 12:27:23AM +0100, Kay Sievers wrote: > On Thu, Jan 22, 2004 at 02:58:35PM -0800, Greg KH wrote: > > On Thu, Jan 22, 2004 at 02:40:46PM -0800, Greg KH wrote: > > > > > > So what udev needs to do is look at each device along that "stack" in > > > order to get a match. If a user specifies a idProduct sysfs file that > > > is on the usb device at > > > /sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1:1.0 we should be able > > > to match that up with this scsi block device, if so asked. > > > > > > It would also "solve" the problem where someone wanted to specify the > > > idProduct and idVendor for a usb printer, but udev couldn't find it. > > > > And here's a horrible abuse of gotos that adds this support to udev. > > Oh, I like goto's too. :) > > Cool, works for me. > Maybe "try_parent:" sounds better than "no_good" :) I cleaned the code up a bit more and checked it in, but perhaps that change would be nice too :) > I will port it to udevinfo and print the keys with its correspondig BUS, > so it should be easy for the user to build a rule. Nice. > Btw. another question, do you know why this ugly multiline info is here? > Doesn't it violate the sysfs conventions? {sigh} Yeah it does. Time to get out my big stick and go after the scsi people again... Ick, wait, I just accepted that patch from the usb storage people... I'll go fix that... thanks, greg k-h ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ 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