[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4E004E73.2040408@ladisch.de>
Date: Tue, 21 Jun 2011 09:55:31 +0200
From: Clemens Ladisch <clemens@...isch.de>
To: Peter Hsiang <Peter.Hsiang@...im-ic.com>
CC: Manuel Estrada Sainz <ranty@...ian.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Getting request_firmware() filename info from user space
Peter Hsiang wrote:
> Using the kernel request_firmware() function, it seems one can send any file by:
> cat myfile.bin > /sys/class/firmware/xxxx/data
>
> How does the user space code obtain the filename parameter specified in the request_firmware() call?
>
> The documentation says $DEVPATH and $FIRMWARE variables are provided in
> the environment, but "echo $FIRMWARE" prints an empty string.
drivers/base/firmware_class.c has:
static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env)
{
struct firmware_priv *fw_priv = to_firmware_priv(dev);
if (add_uevent_var(env, "FIRMWARE=%s", fw_priv->fw_id))
return -ENOMEM;
if (add_uevent_var(env, "TIMEOUT=%i", loading_timeout))
return -ENOMEM;
if (add_uevent_var(env, "ASYNC=%d", fw_priv->nowait))
return -ENOMEM;
return 0;
}
Are these available at least in the udev rule?
Regards,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists