From 32e879f0a3e984ae319f8438af6ac240911a4cbf Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 6 Nov 2014 09:07:28 +0100 Subject: 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 --- commands/global.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'commands/global.c') 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; -- cgit v1.2.3