diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-10-07 08:00:13 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-10-07 08:00:13 +0200 |
commit | 9aa6dd027012892d14aa53f9c3d6965c37afc001 (patch) | |
tree | b97a8cb9ee8bf1c154ca52c010c9808d02b4fd85 /common/console_simple.c | |
parent | 408f054247fa7250546bc041b1deb306d0b9fa98 (diff) | |
parent | 666f12e0c19a19f4431e05f6e5b37e657a62038f (diff) | |
download | barebox-9aa6dd027012892d14aa53f9c3d6965c37afc001.tar.gz barebox-9aa6dd027012892d14aa53f9c3d6965c37afc001.tar.xz |
Merge branch 'for-next/login'
Conflicts:
include/console.h
Diffstat (limited to 'common/console_simple.c')
-rw-r--r-- | common/console_simple.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/console_simple.c b/common/console_simple.c index 5ab937fdb7..6cb72bb46a 100644 --- a/common/console_simple.c +++ b/common/console_simple.c @@ -3,6 +3,7 @@ #include <fs.h> #include <errno.h> #include <debug_ll.h> +#include <console.h> LIST_HEAD(console_list); EXPORT_SYMBOL(console_list); @@ -40,6 +41,9 @@ EXPORT_SYMBOL(console_putc); int tstc(void) { + if (unlikely(!console_is_input_allow())) + return 0; + if (!console) return 0; @@ -49,6 +53,9 @@ EXPORT_SYMBOL(tstc); int getc(void) { + if (unlikely(!console_is_input_allow())) + return -EPERM; + if (!console) return -EINVAL; return console->getc(console); |