summaryrefslogtreecommitdiffstats
path: root/common/console_simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/console_simple.c')
-rw-r--r--common/console_simple.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/common/console_simple.c b/common/console_simple.c
index 42224842c5..702087bd23 100644
--- a/common/console_simple.c
+++ b/common/console_simple.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
#include <config.h>
#include <common.h>
#include <fs.h>
@@ -68,7 +70,7 @@ EXPORT_SYMBOL(console_flush);
int ctrlc (void)
{
int ret = 0;
-#ifdef ARCH_HAS_CTRLC
+#ifdef CONFIG_ARCH_HAS_CTRLC
ret = arch_ctrlc();
#else
if (tstc() && getchar() == 3)
@@ -92,7 +94,10 @@ int console_register(struct console_device *newcdev)
newcdev->setbrg(newcdev, newcdev->baudrate);
}
- newcdev->f_active = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
+ newcdev->f_active = CONSOLE_STDIOE;
+
+ if (IS_ENABLED(CONFIG_CONSOLE_DISABLE_INPUT))
+ newcdev->f_active &= ~CONSOLE_STDIN;
barebox_banner();