diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-04-03 22:52:28 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-04-04 08:36:35 +0200 |
commit | 3e39d067c8ef4419830735a4be89f3065b5ba701 (patch) | |
tree | d36cb6292a49c3aec7b0cc339311bf3665b25f91 /common/globalvar.c | |
parent | 7e642324bcde0f09e014bf04feaab1d2f40199db (diff) | |
download | barebox-3e39d067c8ef4419830735a4be89f3065b5ba701.tar.gz barebox-3e39d067c8ef4419830735a4be89f3065b5ba701.tar.xz |
global command: print info about variables
The info contains useful information at least for enums, for these the
possible values are printed. This makes the output of the "global"
command more useful and similar to "devinfo global"
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/globalvar.c')
-rw-r--r-- | common/globalvar.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/globalvar.c b/common/globalvar.c index 52808f8852..4cf635c0c7 100644 --- a/common/globalvar.c +++ b/common/globalvar.c @@ -321,7 +321,10 @@ static void device_param_print(struct device_d *dev) if (IS_ENABLED(CONFIG_NVVAR) && dev != &nv_device) nv = dev_get_param(&nv_device, param->name); - printf("%s%s: %s\n", nv ? "* " : " ", param->name, p); + printf("%s%s: %s", nv ? "* " : " ", param->name, p); + if (param->info) + param->info(param); + printf("\n"); } } |