summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/console_simple.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/common/console_simple.c b/common/console_simple.c
index 010e0b34c1..6d293b2ba1 100644
--- a/common/console_simple.c
+++ b/common/console_simple.c
@@ -64,16 +64,20 @@ void console_flush(void)
}
EXPORT_SYMBOL(console_flush);
-#ifndef ARCH_HAS_CTRLC
void ctrlc_handled(void)
{
}
/* test if ctrl-c was pressed */
int ctrlc (void)
{
+ int ret = 0;
+#ifdef ARCH_HAS_CTRLC
+ ret = arch_ctrlc();
+#else
if (tstc() && getchar() == 3)
- return 1;
- return 0;
+ ret = 1;
+#endif
+ return ret;
}
EXPORT_SYMBOL(ctrlc);
@@ -85,8 +89,6 @@ void console_ctrlc_forbid(void)
{
}
-#endif /* ARCH_HAS_CTRC */
-
int console_register(struct console_device *newcdev)
{
if (console)