X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fconsole.c;h=4695386a332ab867c12df32e938d4976ce7f0115;hb=c88eaea0a0a809884388c3a5727d960bac0b0ced;hp=5576dfd94ae3ed3db5d3532de1b895ade291680d;hpb=7793ac96c6094e0a0291e19a5bcf3000c6388250;p=karo-tx-uboot.git diff --git a/common/console.c b/common/console.c index 5576dfd94a..4695386a33 100644 --- a/common/console.c +++ b/common/console.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -417,7 +418,7 @@ static inline void print_pre_console_buffer(void) {} void putc(const char c) { #ifdef CONFIG_SANDBOX - if (!gd) { + if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { os_putc(c); return; } @@ -447,7 +448,7 @@ void putc(const char c) void puts(const char *s) { #ifdef CONFIG_SANDBOX - if (!gd) { + if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { os_puts(s); return; } @@ -524,6 +525,7 @@ static int ctrlc_disabled = 0; /* see disable_ctrl() */ static int ctrlc_was_pressed = 0; int ctrlc(void) { +#ifndef CONFIG_SANDBOX if (!ctrlc_disabled && gd->have_console) { if (tstc()) { switch (getc()) { @@ -535,6 +537,8 @@ int ctrlc(void) } } } +#endif + return 0; } /* Reads user's confirmation. @@ -618,7 +622,7 @@ inline void dbg(const char *fmt, ...) } #else -inline void dbg(const char *fmt, ...) +static inline void dbg(const char *fmt, ...) { } #endif