PCMCIA product id strings -> hashes generation at compilation time? [Was: Re: [patch 14/38] pcmcia: id_table for wavelan_cs]

Linus Torvalds torvalds at osdl.org
Tue Mar 8 17:54:57 EST 2005



On Tue, 8 Mar 2005, Dominik Brodowski wrote:
>
>				 Unfortunately, these strings cannot
> be passed to userspace for easy userspace-based loading of appropriate
> modules (MODNAME -- hotplug), so my suggestion is to also store crc32 hashes
> of the strings in the MODULE_DEVICE_TABLEs, e.g.:
> 
> PCMCIA_DEVICE_PROD_ID12("LINKSYS", "E-CARD", 0xf7cb0b07, 0x6701da11),

Hmm.. I'm with Andrew on this one - I'd much rather really pass them to 
user space as strings. We already pass a number of strings as environment 
variables.

In fact, what's wrong with DEVPATH? Which we already expose as the
NAME=xxx environment variable. So if the kboject associated with a device
has has this string associated with its name (which it should), then 
hotplug will automatially pass that as the DEVPATH.

So if you just fill out the kobject name with the product ID's (well, 
with the proper escaping of strange characters, of course), everything 
should just work. No?

		Linus



More information about the linux-pcmcia mailing list