diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-04-06 13:59:29 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-04-11 08:33:48 +0200 |
commit | 1b4a05c9263ae26083526acfabdea1ef96531a1d (patch) | |
tree | e41d654539e018930f0d012c1ee12415eead4117 /common/console_common.c | |
parent | c5d95eb4c72a2639c10d01a801df00b4c34db315 (diff) | |
download | barebox-1b4a05c9263ae26083526acfabdea1ef96531a1d.tar.gz barebox-1b4a05c9263ae26083526acfabdea1ef96531a1d.tar.xz |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/console_common.c b/common/console_common.c index d051458de4..b36b3ff083 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); |