summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_cons.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2006-05-26 11:00:20 +0000
committerphk <phk@FreeBSD.org>2006-05-26 11:00:20 +0000
commit014f0df978617e44e8f78fafac3ec11e9b9cbb67 (patch)
tree7b98a382af50796ae2a9bba69dc8a2f4d97e1d15 /sys/kern/tty_cons.c
parentd25d724c1207dc9866d0cec5e06a4bce0dedfca9 (diff)
downloadFreeBSD-src-014f0df978617e44e8f78fafac3ec11e9b9cbb67.zip
FreeBSD-src-014f0df978617e44e8f78fafac3ec11e9b9cbb67.tar.gz
If the console has no cncheckc method, use cngetc instead.
Diffstat (limited to 'sys/kern/tty_cons.c')
-rw-r--r--sys/kern/tty_cons.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index 305dd29..f65f7ad 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -598,7 +598,10 @@ cncheckc(void)
STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) {
cn = cnd->cnd_cn;
if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) {
- c = cn->cn_checkc(cn);
+ if (cn->cn_checkc != NULL)
+ c = cn->cn_checkc(cn);
+ else
+ c = cn->cn_getc(cn);
if (c != -1) {
return (c);
}
OpenPOWER on IntegriCloud