]> git.ipfire.org Git - thirdparty/u-boot.git/blame - cmd/help.c
configs: Disable now unbuildable SPI options for boards
[thirdparty/u-boot.git] / cmd / help.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
6b8f5ad1
PT
2/*
3 * Copyright 2000-2009
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6b8f5ad1
PT
5 */
6
7#include <common.h>
8#include <command.h>
9
088f1b19 10static int do_help(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
6b8f5ad1 11{
f8bb6964 12#ifdef CONFIG_CMDLINE
6c7c946c
MV
13 cmd_tbl_t *start = ll_entry_start(cmd_tbl_t, cmd);
14 const int len = ll_entry_count(cmd_tbl_t, cmd);
15 return _do_help(start, len, cmdtp, flag, argc, argv);
f8bb6964
SG
16#else
17 return 0;
18#endif
6b8f5ad1
PT
19}
20
21U_BOOT_CMD(
22 help, CONFIG_SYS_MAXARGS, 1, do_help,
4e1ca93b
PT
23 "print command description/usage",
24 "\n"
25 " - print brief description of all commands\n"
26 "help command ...\n"
27 " - print detailed usage of 'command'"
6b8f5ad1
PT
28);
29
30/* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */
ef123c52 31ll_entry_declare(cmd_tbl_t, question_mark, cmd) = {
80a48dd4 32 "?", CONFIG_SYS_MAXARGS, cmd_always_repeatable, do_help,
6b8f5ad1 33 "alias for 'help'",
4e1ca93b 34#ifdef CONFIG_SYS_LONGHELP
6b8f5ad1 35 ""
6b8f5ad1 36#endif /* CONFIG_SYS_LONGHELP */
4e1ca93b 37};