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.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/common/console_simple.c b/common/console_simple.c
index 6d293b2ba1..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>
@@ -64,14 +66,11 @@ void console_flush(void)
}
EXPORT_SYMBOL(console_flush);
-void ctrlc_handled(void)
-{
-}
/* test if ctrl-c was pressed */
int ctrlc (void)
{
int ret = 0;
-#ifdef ARCH_HAS_CTRLC
+#ifdef CONFIG_ARCH_HAS_CTRLC
ret = arch_ctrlc();
#else
if (tstc() && getchar() == 3)
@@ -81,14 +80,6 @@ int ctrlc (void)
}
EXPORT_SYMBOL(ctrlc);
-void console_ctrlc_allow(void)
-{
-}
-
-void console_ctrlc_forbid(void)
-{
-}
-
int console_register(struct console_device *newcdev)
{
if (console)
@@ -103,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();