diff options
author | Tom Rini <trini@konsulko.com> | 2020-06-13 09:01:01 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-06-13 09:01:01 -0400 |
commit | f9e3d2e147ee3b18dbc09e56d13e6fc8758ac375 (patch) | |
tree | bd93f43be8a3ea14724aeb5686fbdcb80125623e /cmd | |
parent | 8a1292ce3e21205645a155b23ac083a3fc6b64c1 (diff) | |
parent | cea8f2c995b9d87af6ef42f967402e1c8a3506db (diff) | |
download | u-boot-f9e3d2e147ee3b18dbc09e56d13e6fc8758ac375.tar.gz |
Merge tag 'dm-pull-12jun20' of git://git.denx.de/u-boot-dm into nextWIP/13Jun2020
patman improvements to allow it to work with Zephyr
change to how sequence numbers are assigned to devices
minor fixes and improvements
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/log.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -14,10 +14,18 @@ static char log_fmt_chars[LOGF_COUNT] = "clFLfm"; static int do_log_level(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - if (argc > 1) - gd->default_log_level = simple_strtol(argv[1], NULL, 10); - else + if (argc > 1) { + long log_level = simple_strtol(argv[1], NULL, 10); + + if (log_level < 0 || log_level > _LOG_MAX_LEVEL) { + printf("Only log levels <= %d are supported\n", + _LOG_MAX_LEVEL); + return CMD_RET_FAILURE; + } + gd->default_log_level = log_level; + } else { printf("Default log level: %d\n", gd->default_log_level); + } return 0; } |