summaryrefslogtreecommitdiffstats
path: root/common/cmd_boot.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:01:52 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:01:52 +0200
commite694adc6a4716fc589693eb8eb8e67bbf54e8edc (patch)
treef8af4d37d05c8f628ecc3abbe8c8d48a43794482 /common/cmd_boot.c
parent2692aaeb76f66cc8fe2f1196697d9a75b06c4522 (diff)
downloadbarebox-e694adc6a4716fc589693eb8eb8e67bbf54e8edc.tar.gz
barebox-e694adc6a4716fc589693eb8eb8e67bbf54e8edc.tar.xz
svn_rev_420
- do more POSIX: - use DIR instead of struct dirent - use (struct dirent)->d_name instead of (struct dirent)->name - switch to a new layout for U_BOOT_CMD: - use C99 initializers to be able to add more fields to the command struct - add aliases for commands (needed mainly for help -> ? and test -> [ - This is not done for all commands yet, but the compiler will tell you ;)
Diffstat (limited to 'common/cmd_boot.c')
-rw-r--r--common/cmd_boot.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/common/cmd_boot.c b/common/cmd_boot.c
index 3b77784bdc..43fc18259b 100644
--- a/common/cmd_boot.c
+++ b/common/cmd_boot.c
@@ -73,17 +73,19 @@ int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
/* -------------------------------------------------------------------- */
-U_BOOT_CMD(
- go, CONFIG_MAXARGS, 1, do_go,
- "go - start application at address 'addr'\n",
+U_BOOT_CMD_START(go)
+ .maxargs = CONFIG_MAXARGS,
+ .cmd = do_go,
+ .usage = "go - start application at address 'addr'\n",
+ U_BOOT_CMD_HELP(
"addr [arg ...]\n - start application at address 'addr'\n"
- " passing 'arg' as arguments\n"
-);
+ " passing 'arg' as arguments\n")
+U_BOOT_CMD_END
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-U_BOOT_CMD(
- reset, CONFIG_MAXARGS, 1, do_reset,
- "reset - Perform RESET of the CPU\n",
- NULL
-);
+U_BOOT_CMD_START(reset)
+ .maxargs = CONFIG_MAXARGS,
+ .cmd = do_reset,
+ .usage = "reset - Perform RESET of the CPU\n",
+U_BOOT_CMD_END