From: Clemens Ladisch <clemens@ladisch.de>
To: Peter Hsiang <Peter.Hsiang@maxim-ic.com>
Cc: Manuel Estrada Sainz <ranty@debian.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Getting request_firmware() filename info from user space
Date: Tue, 21 Jun 2011 09:55:31 +0200 [thread overview]
Message-ID: <4E004E73.2040408@ladisch.de> (raw)
In-Reply-To: <B2150E1E4418E1438554A300EA5040E40DDE603CE3@ITSVLEX06.it.maxim-ic.internal>
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
prev parent reply other threads:[~2011-06-21 7:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 1:20 Getting request_firmware() filename info from user space Peter Hsiang
2011-06-21 7:55 ` Clemens Ladisch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E004E73.2040408@ladisch.de \
--to=clemens@ladisch.de \
--cc=Peter.Hsiang@maxim-ic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ranty@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox