summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-27 21:31:46 +0000
committerwdenk <wdenk>2003-06-27 21:31:46 +0000
commit8bde7f776c77b343aca29b8c7b58464d915ac245 (patch)
tree20f1fd99975215e7c658454a15cdb4ed4694e2d4 /common/main.c
parent993cad9364c6b87ae429d1ed1130d8153f6f027e (diff)
downloadu-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.zip
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.gz
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.bz2
* 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)
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/common/main.c b/common/main.c
index f538870..f7830a1 100644
--- a/common/main.c
+++ b/common/main.c
@@ -26,17 +26,19 @@
#include <common.h>
#include <watchdog.h>
#include <command.h>
-#include <cmd_nvedit.h>
-#include <cmd_bootm.h>
#include <malloc.h>
-#if defined(CONFIG_BOOT_RETRY_TIME) && defined(CONFIG_RESET_TO_RETRY)
-#include <cmd_boot.h> /* for do_reset() prototype */
-#endif
#ifdef CFG_HUSH_PARSER
#include <hush.h>
#endif
+#if defined(CONFIG_BOOT_RETRY_TIME) && defined(CONFIG_RESET_TO_RETRY)
+extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* for do_reset() prototype */
+#endif
+
+extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+
+
#define MAX_DELAY_STOP_STR 32
static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen);
@@ -143,7 +145,7 @@ static __inline__ int abortboot(int bootdelay)
if (delaykey[i].len > 0 &&
presskey_len >= delaykey[i].len &&
memcmp (presskey + presskey_len - delaykey[i].len,
- delaykey[i].str,
+ delaykey[i].str,
delaykey[i].len) == 0) {
# if DEBUG_BOOTKEYS
printf("got %skey\n",
@@ -196,17 +198,17 @@ static __inline__ int abortboot(int bootdelay)
#endif
#if defined CONFIG_ZERO_BOOTDELAY_CHECK
- /*
- * Check if key already pressed
- * Don't check if bootdelay < 0
- */
+ /*
+ * Check if key already pressed
+ * Don't check if bootdelay < 0
+ */
if (bootdelay >= 0) {
if (tstc()) { /* we got a key press */
(void) getc(); /* consume input */
printf ("\b\b\b 0\n");
return 1; /* don't auto boot */
}
- }
+ }
#endif
while (bootdelay > 0) {
@@ -633,7 +635,7 @@ static void process_macros (const char *input, char *output)
int state = 0; /* 0 = waiting for '$' */
/* 1 = waiting for '(' */
/* 2 = waiting for ')' */
- /* 3 = waiting for ''' */
+ /* 3 = waiting for ''' */
#ifdef DEBUG_PARSER
char *output_start = output;
@@ -652,7 +654,7 @@ static void process_macros (const char *input, char *output)
if (inputcnt-- == 0)
break;
prev = c;
- c = *input++;
+ c = *input++;
}
}