From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kay Sievers" Date: Tue, 14 Oct 2008 14:33:24 +0000 Subject: Re: Loading firmware Message-Id: List-Id: References: <003c01c92d81$89978710$9cc69530$@com> In-Reply-To: <003c01c92d81$89978710$9cc69530$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, Oct 14, 2008 at 12:17 AM, Jasem Mutlaq wrote: > I need to load firmware to a USB camera via fxload. The problem is that > fxload requires a path such as /dev/bus/usb/001/002 in order to load the > firmware. So I wrote a udev rules file to do just that, however, the only > useful variable I can obtain now is %k, and I get something in the form of > usbdev1.2_ep00 That's not a USB _device_, it's a (not interesting) USB endpoint. > which I then need to parse in some regexp magic in order to > extract the bus and dev num in order to construct the full path. I used to > be able to pull devnum and busnum ($env{BUSNUM}) but not anymore (using > openSUSE 11). That still works. > Now I have a loader script that parses %k and constructs the > path. But this is only a hack and not a real solution, is there a way to get > the full path so I can pass it to fxload without resorting to these > desperate measures? Appreciate your help. Why not just use $DEVNAME? RUN+="/sbin/fxload -D $env{DEVNAME}" Kay