From 8bde7f776c77b343aca29b8c7b58464d915ac245 Mon Sep 17 00:00:00 2001 From: wdenk Date: Fri, 27 Jun 2003 21:31:46 +0000 Subject: * Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) --- common/cmd_autoscript.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'common/cmd_autoscript.c') diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c index 7e706c93a7..d3d04c3040 100644 --- a/common/cmd_autoscript.c +++ b/common/cmd_autoscript.c @@ -40,8 +40,6 @@ #include #include #include -#include -#include #if defined(CONFIG_8xx) #include #endif @@ -49,8 +47,9 @@ #include #endif +#define AUTOSCRIPT_MAGIC 0x09011962 #if defined(CONFIG_AUTOSCRIPT) || \ - (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) + (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT ) extern image_header_t header; /* from cmd_bootm.c */ int @@ -118,7 +117,7 @@ autoscript (ulong addr) memmove (cmd, (char *)len_ptr, len); *(cmd + len) = 0; -#ifdef CFG_HUSH_PARSER +#ifdef CFG_HUSH_PARSER /*?? */ rcode = parse_string_outer (cmd, FLAG_PARSE_SEMICOLON); #else { @@ -153,7 +152,7 @@ autoscript (ulong addr) } #endif /* CONFIG_AUTOSCRIPT || CFG_CMD_AUTOSCRIPT */ - +/**************************************************/ #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) int do_autoscript (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) @@ -171,4 +170,14 @@ do_autoscript (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) rcode = autoscript (addr); return rcode; } + +#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) +cmd_tbl_t U_BOOT_CMD(AUTOSCRIPT) = MK_CMD_ENTRY( + "autoscr", 2, 0, do_autoscript, + "autoscr - run script from memory\n", + "[addr] - run script starting at addr" + " - A valid autoscr header must be present\n" +); #endif /* CFG_CMD_AUTOSCRIPT */ + +#endif /* CONFIG_AUTOSCRIPT || CFG_CMD_AUTOSCRIPT */ -- cgit v1.2.1