From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Kagan Date: Fri, 11 Feb 2005 10:53:56 +0000 Subject: Re: [ANNOUNCE] hotplug-ng 001 release Message-Id: <20050211105356.GA2858@katya> List-Id: References: <20050211004033.GA26624@suse.de> In-Reply-To: <20050211004033.GA26624@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, Feb 11, 2005 at 11:10:44AM +0300, Roman Kagan wrote: > As a matter of fact I've been meaning to submit a patch to udev, adding > the functionaly to generate the fnmatch-able device name in the > module-init-utils' style, and propagate it to the hotplug callouts via > an environment variable, say DEVALIAS or MODNAME. BTW this variable could be useful for other hotplug tasks, too. E.g. if a driver handles several device variants each needing a different firmware, then the specific firmware can be put in a subdirectory with a similar fnmatch-able name: % cd /lib/firmware; find ./foo-firmware.bin <- generic ./usb:v1234pABCDdl*dh*dc*dsc*dp*ic*isc*ip* ./usb:v1234pABCDdl*dh*dc*dsc*dp*ic*isc*ip*/foo-firmware.bin <- specific Then the hotplug firmware script would do something like cd /lib/firmware # specific for d in *; do # in sh '=' means fnmatch if [[ $DEVALIAS = $d ]]; then if [[ -r "$d/$FIRMWARE" ]]; then ... exit 0 fi fi done # generic if [[ -r "$FIRMWARE" ]]; then ... fi Cheers, Roman. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ 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