mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] global command: print info about variables
@ 2017-04-04  6:38 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2017-04-04  6:38 UTC (permalink / raw)
  To: Barebox List

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>
---
 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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-04  6:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-04  6:38 [PATCH] global command: print info about variables Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox