From: Holger Schurig <holgerschurig@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: Changing the baudrate via barebox prompt
Date: Wed, 14 May 2014 10:10:58 +0200 [thread overview]
Message-ID: <CAOpc7mEz0qXuNgiA7CsYJ_1nLeFzWaAoR5iUvVu1mw5Foefanw@mail.gmail.com> (raw)
In-Reply-To: <CAOpc7mHnhTLxqA9FABZMSRnf05Ocu99bFTkch1DH63O+7=U-yQ@mail.gmail.com>
Here's a WIP:
index d92788a..9e639bb 100644
--- a/commands/magicvar.c
+++ b/commands/magicvar.c
@@ -5,12 +5,22 @@
static int do_magicvar(int argc, char *argv[])
{
struct magicvar *m;
+ struct device_d *dev;
+ struct param_d *param;
for (m = &__barebox_magicvar_start;
m != &__barebox_magicvar_end;
m++)
printf("%-32s %s\n", m->name, m->description);
+ for_each_device(dev) {
+ if (!strcmp("global", dev_name(dev)))
+ continue;
+ list_for_each_entry(param, &dev->parameters, list) {
+ printf("%s.%s\n", dev_name(dev), param->name);
+ }
+ }
+
return 0;
}
However, the output lacks descriptions:
barebox:/ magicvar
...
global.login.timeout timeout to type the password
global.model Product name of this hardware
global.version The barebox version
net.nameserver
net.domainname
cs0.baudrate
cs0.active
cs1.baudrate
cs1.active
cs2.baudrate
cs2.active
cs3.baudrate
cs3.active
cs4.baudrate
cs4.active
eth0.ipaddr
eth0.serverip
eth0.gateway
eth0.netmask
eth0.ethaddr
mmc1.probe
mmc3.probe
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-05-14 8:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 3:34 Fabio Estevam
2014-05-14 4:59 ` Kevin Du Huanpeng
2014-05-14 5:32 ` Antony Pavlov
2014-05-14 6:09 ` Holger Schurig
2014-05-14 7:20 ` Sascha Hauer
2014-05-14 8:01 ` Holger Schurig
2014-05-14 8:10 ` Holger Schurig [this message]
2014-05-14 8:16 ` Sascha Hauer
2014-05-14 12:32 ` Fabio Estevam
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=CAOpc7mEz0qXuNgiA7CsYJ_1nLeFzWaAoR5iUvVu1mw5Foefanw@mail.gmail.com \
--to=holgerschurig@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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