From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jasem Mutlaq" Date: Tue, 14 Oct 2008 13:16:01 +0000 Subject: RE: Loading firmware Message-Id: <007601c92dff$03612ba0$0a2382e0$@com> 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 > Does something like this help: > > , ACTION="add", RUN+="/sbin/fxload > -D /dev/$name" > > Where $name points to the device name and will be set earlier by the > default rules. It didn't work. The $name that I get is in the form of usbdev1.8_ep00 still. However, I tried the following BUS="usb", ACTION="add", <...etc...> , ENV{devpath}="$attr{busnum}/$attr{devnum}" RUN+="/sbin/fxload -I /lib/firmware/foo.hex -D /dev/bus/usb/$env{devpath}" Only that $devpath evaluates to 1/8 or 10/7, but the number must always be 3 digits with zeros filling the leading digits, e.g. /dev/bus/usb/001/008 or /dev/bus/usb/010/007 I have no idea how to do this in the rules files without calling an external script. Regards, Jasem