summaryrefslogtreecommitdiff
path: root/common/command.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-07-01 21:06:45 +0000
committerwdenk <wdenk>2003-07-01 21:06:45 +0000
commit0d4983930a3559be92452761cfa268ee9d0f2773 (patch)
treecfb77c1274a959cde007a7ac4e18b4b0d67bd253 /common/command.c
parentb37c7e5e5c3c80c68f49a31c4308b159bb5bda1a (diff)
Patch by Kenneth Johansson, 30 Jun 2003:
get rid of MK_CMD_ENTRY macro; update doc/README.command
Diffstat (limited to 'common/command.c')
-rw-r--r--common/command.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/common/command.c b/common/command.c
index 9a982b8da2e..dfec9c138a7 100644
--- a/common/command.c
+++ b/common/command.c
@@ -36,8 +36,8 @@ do_version (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return 0;
}
-cmd_tbl_t U_BOOT_CMD(VERS) = MK_CMD_ENTRY(
- "version", 1, 1, do_version,
+U_BOOT_CMD(
+ version, 1, 1, do_version,
"version - print monitor version\n",
NULL
);
@@ -67,8 +67,8 @@ do_echo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return 0;
}
-cmd_tbl_t U_BOOT_CMD(ECHO) = MK_CMD_ENTRY(
- "echo", CFG_MAXARGS, 1, do_echo,
+U_BOOT_CMD(
+ echo, CFG_MAXARGS, 1, do_echo,
"echo - echo args to console\n",
"[args..]\n"
" - echo args to console; \\c suppresses newline\n"
@@ -158,8 +158,8 @@ int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
}
-cmd_tbl_t U_BOOT_CMD(HELP) = MK_CMD_ENTRY(
- "help", CFG_MAXARGS, 1, do_help,
+U_BOOT_CMD(
+ help, CFG_MAXARGS, 1, do_help,
"help - print online help\n",
"[command ...]\n"
" - show help information (for 'command')\n"
@@ -169,11 +169,19 @@ cmd_tbl_t U_BOOT_CMD(HELP) = MK_CMD_ENTRY(
"'help' with one or more command names as arguments.\n"
);
-cmd_tbl_t U_BOOT_CMD(QUES) = MK_CMD_ENTRY(
+/* This do not ust the U_BOOT_CMD macro as ? can't be used in symbol names */
+#ifdef CFG_LONGHELP
+cmd_tbl_t __u_boot_cmd_question_mark Struct_Section = {
"?", CFG_MAXARGS, 1, do_help,
"? - alias for 'help'\n",
NULL
-);
+};
+#else
+cmd_tbl_t __u_boot_cmd_question_mark Struct_Section = {
+ "?", CFG_MAXARGS, 1, do_help,
+ "? - alias for 'help'\n"
+};
+#endif /* CFG_LONGHELP */
/***************************************************************************
* find command table entry for a command