projects
/
oweals
/
u-boot_mod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
818695f
)
Ignore null character when waiting for autoboot abort
author
Piotr Dymacz
<pepe2k@gmail.com>
Thu, 31 Mar 2016 09:30:35 +0000
(11:30 +0200)
committer
Piotr Dymacz
<pepe2k@gmail.com>
Thu, 31 Mar 2016 09:30:35 +0000
(11:30 +0200)
u-boot/common/main.c
patch
|
blob
|
history
diff --git
a/u-boot/common/main.c
b/u-boot/common/main.c
index 42f3d57d2d37e859b37aa0bb1cfb8cb153063058..6c50e7a0d1113f94048e2d8ebd8be611f7f9f91a 100644
(file)
--- a/
u-boot/common/main.c
+++ b/
u-boot/common/main.c
@@
-58,9
+58,7
@@
static char tab_seq[] = " "; /* used to expand TABs */
*/
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
static __inline__ int abortboot(int bootdelay){
*/
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
static __inline__ int abortboot(int bootdelay){
-#ifdef CONFIG_AUTOBOOT_STOP_CHAR
char stopc;
char stopc;
-#endif
int abort = 0;
#ifdef CONFIG_SILENT_CONSOLE
int abort = 0;
#ifdef CONFIG_SILENT_CONSOLE
@@
-85,26
+83,19
@@
static __inline__ int abortboot(int bootdelay){
/* delay 100 * 10ms */
for(i = 0; !abort && i < 100; ++i){
/* delay 100 * 10ms */
for(i = 0; !abort && i < 100; ++i){
-
/* we got a key press */
if(tstc()){
/* we got a key press */
if(tstc()){
-#ifdef CONFIG_AUTOBOOT_STOP_CHAR
stopc = getc();
stopc = getc();
+#ifdef CONFIG_AUTOBOOT_STOP_CHAR
if (stopc == CONFIG_AUTOBOOT_STOP_CHAR) {
if (stopc == CONFIG_AUTOBOOT_STOP_CHAR) {
+#else
+ if (stopc != 0) {
+#endif
abort = 1;
bootdelay = 0;
break;
}
abort = 1;
bootdelay = 0;
break;
}
-#else
- /* don't auto boot */
- abort = 1;
- /* no more delay */
- bootdelay = 0;
- /* consume input */
- (void) getc();
- break;
-#endif /* CONFIG_AUTOBOOT_STOP_CHAR */
}
udelay(10000);
}
}
udelay(10000);
}