[PATCH] global command: print info about variables

Sascha Hauer s.hauer at pengutronix.de
Mon Apr 3 23:38:36 PDT 2017


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 at pengutronix.de>
---
 common/globalvar.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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");
 	}
 }
 
-- 
2.11.0




More information about the barebox mailing list