From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik van Konijnenburg Date: Mon, 21 Feb 2005 20:40:04 +0000 Subject: Re: [ANNOUNCE] hotplug-ng 001 release Message-Id: <20050221214004.A2736@banaan.localdomain> 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 Sat, Feb 12, 2005 at 03:34:58AM +0300, Roman Kagan wrote: > Then why not just make the kernel (and coldplug) create an additional > environment variable with the fnmatch-able module name ready to use with > modprobe? Given that kernel (and coldplug) have all the IDs in the nice > integer form it would be a matter of a single add_hotplug_env_var() (or > sprintf()) call per each device type, and would be even tinier that the > hotplug-ng :) There's one twist that I can't figure out: Here's the matching code from usb.c, which is emulated by hotplug/usb.agent: if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) && (id->bcdDevice_lo > dev->descriptor.bcdDevice)) continue; if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) && (id->bcdDevice_hi < dev->descriptor.bcdDevice)) continue; Here are some samples from modules.alias: alias usb:v097Ap0001dl0000dh0001dc*dsc*dp*ic*isc*ip* usb_storage alias usb:v05A9p0511dl*dh*dc*dsc*dp*ic*isc*ip* ov511 And the read_config_file function in modprobe.c simply does a shell style wildcard match. How can wildcard matching in modprobe against these aliases give the same result as a numeric range comparison on DEV_LO and DEV_HI in kernel and hotplug agents? Since I don't know what modules.aliases was originally intended for, I may be missing something obvious. Any hints appreciated. Regards, Erik ------------------------------------------------------- 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