Date: Fri, 2 Jan 2009 23:32:43 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186706 - head/sys/kern Message-ID: <200901022332.n02NWhbX010412@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Fri Jan 2 23:32:43 2009 New Revision: 186706 URL: http://svn.freebsd.org/changeset/base/186706 Log: Don't let /dev/console be revoked if the TTY below is being closed. During startup some of the syscons TTY's are used to set attributes like the screensaver and mouse options. These actions cause /dev/console to be rendered unusable. Fix the issue by leaving the TTY opened when it is used as the console device. Reported by: imp Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Fri Jan 2 22:51:30 2009 (r186705) +++ head/sys/kern/tty.c Fri Jan 2 23:32:43 2009 (r186706) @@ -308,6 +308,13 @@ ttydev_close(struct cdev *dev, int fflag { struct tty *tp = dev->si_drv1; + /* + * Don't actually close the device if it is being used as the + * console. + */ + if (strcmp(dev_console_filename, tty_devname(tp)) == 0) + return (0); + tty_lock(tp); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901022332.n02NWhbX010412>