summaryrefslogtreecommitdiff
path: root/cleopatre/u-boot-1.1.6/common
diff options
context:
space:
mode:
authorlefranc2010-01-14 16:11:15 +0000
committerlefranc2010-01-14 16:11:15 +0000
commitba9da97d1015f3a523465755a8b6c3baeacec383 (patch)
treec3614273dd26abf0e66039b49123581cc9351c0b /cleopatre/u-boot-1.1.6/common
parentd289e46e0609a2e90e3329da250d330754d7ab71 (diff)
cleo/u-boot: do not go to prompt if first char is a break, closes #1067
- this feature can be removed in spk300g.h config (see CONFIG_EAT_FIRST_BREAK) git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6618 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cleopatre/u-boot-1.1.6/common')
-rw-r--r--cleopatre/u-boot-1.1.6/common/main.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/cleopatre/u-boot-1.1.6/common/main.c b/cleopatre/u-boot-1.1.6/common/main.c
index cc4b50f615..58d3262285 100644
--- a/cleopatre/u-boot-1.1.6/common/main.c
+++ b/cleopatre/u-boot-1.1.6/common/main.c
@@ -243,27 +243,38 @@ static __inline__ int abortboot(int bootdelay)
*/
if (bootdelay >= 0) {
if (tstc()) { /* we got a key press */
+#if defined CONFIG_EAT_FIRST_BREAK
+ char c = getc ();
+ if (c != '\0')
+ abort = 1;
+ puts ("\b\b\b 0");
+#else /* CONFIG_EAT_FIRST_BREAK */
(void) getc(); /* consume input */
puts ("\b\b\b 0");
abort = 1; /* don't auto boot */
+#endif /* CONFIG_EAT_FIRST_BREAK */
}
}
#endif
while ((bootdelay > 0) && (!abort)) {
int i;
-
- --bootdelay;
+ char c;
+ --bootdelay;
/* delay 100 * 10ms */
for (i=0; !abort && i<100; ++i) {
if (tstc()) { /* we got a key press */
- abort = 1; /* don't auto boot */
- bootdelay = 0; /* no more delay */
# ifdef CONFIG_MENUKEY
menukey = getc();
# else
- (void) getc(); /* consume input */
+ c = getc(); /* consume input */
# endif
+#if defined CONFIG_EAT_FIRST_BREAK
+ if (c == '\0')
+ continue;
+#endif /* CONFIG_EAT_FIRST_BREAK */
+ abort = 1; /* don't auto boot */
+ bootdelay = 0; /* no more delay */
break;
}
udelay (10000);