summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu/start.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/cpu/start.c')
-rw-r--r--arch/sandbox/cpu/start.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index 59c68a20c52..85f27829ca4 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -273,6 +273,16 @@ static int sandbox_cmdline_cb_verbose(struct sandbox_state *state,
}
SANDBOX_CMDLINE_OPT_SHORT(verbose, 'v', 0, "Show test output");
+static int sandbox_cmdline_cb_log_level(struct sandbox_state *state,
+ const char *arg)
+{
+ state->default_log_level = simple_strtol(arg, NULL, 10);
+
+ return 0;
+}
+SANDBOX_CMDLINE_OPT_SHORT(log_level, 'L', 1,
+ "Set log level (0=panic, 7=debug)");
+
int board_run_command(const char *cmdline)
{
printf("## Commands are disabled. Please enable CONFIG_CMDLINE.\n");
@@ -313,6 +323,9 @@ int main(int argc, char *argv[])
#if CONFIG_VAL(SYS_MALLOC_F_LEN)
gd->malloc_base = CONFIG_MALLOC_F_ADDR;
#endif
+#if CONFIG_IS_ENABLED(LOG)
+ gd->default_log_level = state->default_log_level;
+#endif
setup_ram_buf(state);
/* Do pre- and post-relocation init */