summaryrefslogtreecommitdiffstats
path: root/common/console_common.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-04-06 13:59:29 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-04-11 08:33:48 +0200
commit1b4a05c9263ae26083526acfabdea1ef96531a1d (patch)
treee41d654539e018930f0d012c1ee12415eead4117 /common/console_common.c
parentc5d95eb4c72a2639c10d01a801df00b4c34db315 (diff)
downloadbarebox-1b4a05c9263ae26083526acfabdea1ef96531a1d.tar.gz
globalvar: make globalvar functions more consistent
Similar to the device parameter functions also make the globalvar functions more consistent. This also adds support for readonly globalvars and changes several existing globalvars which should really be readonly to readonly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/console_common.c')
-rw-r--r--common/console_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/console_common.c b/common/console_common.c
index d051458..b36b3ff 100644
--- a/common/console_common.c
+++ b/common/console_common.c
@@ -148,10 +148,10 @@ int dev_printf(int level, const struct device_d *dev, const char *format, ...)
static int loglevel_init(void)
{
if (IS_ENABLED(CONFIG_LOGBUF))
- globalvar_add_simple_int("log_max_messages",
- &barebox_log_max_messages, "%d");
+ globalvar_add_simple_uint32("log_max_messages",
+ &barebox_log_max_messages, "%u");
- return globalvar_add_simple_int("loglevel", &barebox_loglevel, "%d");
+ return globalvar_add_simple_uint32("loglevel", &barebox_loglevel, "%u");
}
device_initcall(loglevel_init);