2 * Copyright (c) 2017 Google, Inc
3 * Written by Simon Glass <sjg@chromium.org>
5 * SPDX-License-Identifier: GPL-2.0+
13 static int do_log_level(cmd_tbl_t *cmdtp, int flag, int argc,
17 gd->default_log_level = simple_strtol(argv[1], NULL, 10);
19 printf("Default log level: %d\n", gd->default_log_level);
24 static cmd_tbl_t log_sub[] = {
25 U_BOOT_CMD_MKENT(level, CONFIG_SYS_MAXARGS, 1, do_log_level, "", ""),
28 static int do_log(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
35 /* drop initial "log" arg */
39 cp = find_cmd_tbl(argv[0], log_sub, ARRAY_SIZE(log_sub));
41 return cp->cmd(cmdtp, flag, argc, argv);
46 #ifdef CONFIG_SYS_LONGHELP
47 static char log_help_text[] =
48 "level - get/set log level\n"
53 log, CONFIG_SYS_MAXARGS, 1, do_log,
54 "log system", log_help_text