Date: Tue, 7 Jul 2015 11:06:28 -0700 From: John-Mark Gurney <jmg@funkthat.com> To: Bruce Evans <brde@optusnet.com.au> Cc: Ian Lepore <ian@freebsd.org>, Neel Natu <neel@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285217 - head/usr.sbin/bhyve Message-ID: <20150707180627.GD8523@funkthat.com> In-Reply-To: <20150707122407.O1017@besplex.bde.org> References: <201507061933.t66JXTtJ050058@repo.freebsd.org> <1436213492.1334.64.camel@freebsd.org> <20150707122407.O1017@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote this message on Tue, Jul 07, 2015 at 16:11 +1000: > - tty_init_console() doesn't set CLOCAL in the lock state device. So > without fixation, bugs like the one in reset(1) break serial consoles. Here's a patch to fix that: Index: tty.c =================================================================== --- tty.c (revision 284880) +++ tty.c (working copy) @@ -858,6 +858,8 @@ tty_init_console(struct tty *tp, speed_t s) { struct termios *ti = &tp->t_termios_init_in; struct termios *to = &tp->t_termios_init_out; + struct termios *lti = &tp->t_termios_lock_in; + struct termios *lto = &tp->t_termios_lock_out; if (s != 0) { ti->c_ispeed = ti->c_ospeed = s; @@ -866,6 +868,8 @@ tty_init_console(struct tty *tp, speed_t s) ti->c_cflag |= CLOCAL; to->c_cflag |= CLOCAL; + lti->c_cflag |= CLOCAL; + lto->c_cflag |= CLOCAL; } /* I've tested that this fixes the issue (on a machine that doesn't have the bhyve fix yet)... To me this seems a very good way to start it, as it still allows the sysadmin to change the lock device on the console after boot if they so choose... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150707180627.GD8523>