From 4b5d5046ab22f136bdbadea84b5d6eb5c94a2eef Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sun, 19 Sep 2010 14:21:39 +0000 Subject: [PATCH] Ignore DCD handling on /dev/console entirely. This makes /dev/console more fail-safe and prevents a potential console lock-up during boot. Discussed on: stable@ Tested by: koitsu@ MFC after: 1 week --- sys/kern/tty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 90218495937..ed22e7a3910 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -282,7 +282,8 @@ ttydev_open(struct cdev *dev, int oflags, int devtype, struct thread *td) /* Wait for Carrier Detect. */ if (!TTY_CALLOUT(tp, dev) && (oflags & O_NONBLOCK) == 0 && - (tp->t_termios.c_cflag & CLOCAL) == 0) { + (tp->t_termios.c_cflag & CLOCAL) == 0 && + dev != dev_console) { while ((ttydevsw_modem(tp, 0, 0) & SER_DCD) == 0) { error = tty_wait(tp, &tp->t_dcdwait); if (error != 0)