diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-11-06 09:07:28 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-11-06 12:23:12 +0100 |
commit | 32e879f0a3e984ae319f8438af6ac240911a4cbf (patch) | |
tree | ce6ae891a2bdda4ae850f38dae04c46d985ba9e0 /commands | |
parent | b25d333493f4d58b8b99ef20e9ca4cdf32e869c4 (diff) | |
download | barebox-32e879f0a3e984ae319f8438af6ac240911a4cbf.tar.gz barebox-32e879f0a3e984ae319f8438af6ac240911a4cbf.tar.xz |
globalvar: Add support for printing all global variables
This could previously only be done with 'devinfo global'. While
this is still possible this adds a more direct access via the
globalvar command. This variant also adds a '*' in front of
the variable if the corresponding non volatile variable exists.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/global.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/global.c b/commands/global.c index f14df3821a..581913d289 100644 --- a/commands/global.c +++ b/commands/global.c @@ -37,6 +37,11 @@ static int do_global(int argc, char *argv[]) } } + if (argc == optind) { + globalvar_print(); + return 0; + } + argc -= optind; argv += optind; |