summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-12 21:21:17 +0000
committered <ed@FreeBSD.org>2009-06-12 21:21:17 +0000
commit66c6fddb347e7353152d95d23bfa956880501fd0 (patch)
tree4c579fea779ee460d9c5388c490eed5242e4ed96 /sys/kern/tty.c
parent01a6f1d14b53778dbb31fdecbfa8f690fca99973 (diff)
downloadFreeBSD-src-66c6fddb347e7353152d95d23bfa956880501fd0.zip
FreeBSD-src-66c6fddb347e7353152d95d23bfa956880501fd0.tar.gz
Revert my previous change, because it reintroduces an old regression.
Because our rc scripts also open the /etc/ttyv* nodes, it revokes the console, preventing startup messages from being displayed. I really have to think about this. Maybe we should just give the console its own TTY and let it build on top of other TTYs. I'm still not sure what to do with input handling there.
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 4a0905a..162ae37 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -322,14 +322,14 @@ ttydev_close(struct cdev *dev, int fflag, int devtype, struct thread *td)
* console.
*/
MPASS((tp->t_flags & TF_OPENED) != TF_OPENED);
- if (dev == dev_console) {
+ if (dev == dev_console)
tp->t_flags &= ~TF_OPENED_CONS;
- if (tp->t_flags & TF_OPENED) {
- tty_unlock(tp);
- return (0);
- }
- } else {
- tp->t_flags &= ~TF_OPENED;
+ else
+ tp->t_flags &= ~(TF_OPENED_IN|TF_OPENED_OUT);
+
+ if (tp->t_flags & TF_OPENED) {
+ tty_unlock(tp);
+ return (0);
}
/*
OpenPOWER on IntegriCloud