[RFC 1/2] export pcmcia info to hotplug

Greg KH greg at kroah.com
Thu Feb 10 20:04:48 EST 2005


On Thu, Feb 10, 2005 at 09:25:39PM +0100, Dominik Brodowski wrote:
> +        /* stuff we want to pass to /sbin/hotplug */
> +        envp[i++] = scratch;
> +        length += scnprintf (scratch, buffer_size - length,
> +			     "PCMCIA_DEVICE=%01X",
> +			     p_dev->device_no);
> +        if ((buffer_size - length <= 0) || (i >= num_envp))
> +                return -ENOMEM;
> +        ++length;
> +        scratch += length;

Why have "PCMCIA" at the start of all of your environment variables?
You know this is a pcmcia hotplug event, based on the hotplug event
itself.  Why not just drop them, no other subsystem has that.

thanks,

greg k-h



More information about the linux-pcmcia mailing list