diff options
author | yokota <yokota@FreeBSD.org> | 1999-06-29 17:30:33 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 1999-06-29 17:30:33 +0000 |
commit | 934ebfaf1b412e6004776b10b69d1494302264d3 (patch) | |
tree | 13b38a6e50b32ed808fbc2cfe4aba6a8545ec73e /sys/dev/syscons/syscons.c | |
parent | ec30ce339b93d3c5bac7020cc6666437fb32b06a (diff) | |
download | FreeBSD-src-934ebfaf1b412e6004776b10b69d1494302264d3.zip FreeBSD-src-934ebfaf1b412e6004776b10b69d1494302264d3.tar.gz |
Fill in tp->t_windowsize AFTER the call to (*linesw[tp->t_line].l_open)(),
rather than BEFORE the call. Otherwise the structure will be `zero'ed out
by l_open, which actually is ttyopen(), if !TS_OPEN.
PR: kern/12420
Diffstat (limited to 'sys/dev/syscons/syscons.c')
-rw-r--r-- | sys/dev/syscons/syscons.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index c71294d9..eac6d4e 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.308 1999/06/24 09:21:27 yokota Exp $ + * $Id: syscons.c,v 1.309 1999/06/26 11:00:17 peter Exp $ */ #include "sc.h" @@ -481,6 +481,7 @@ scopen(dev_t dev, int flag, int mode, struct proc *p) int unit = scdevtounit(dev); sc_softc_t *sc; keyarg_t key; + int error; if (!tp) return(ENXIO); @@ -518,6 +519,9 @@ scopen(dev_t dev, int flag, int mode, struct proc *p) else if (tp->t_state & TS_XCLUDE && suser(p)) return(EBUSY); + + error = (*linesw[tp->t_line].l_open)(dev, tp); + if ((SC_VTY(dev) != SC_CONSOLECTL) && (SC_VTY(dev) != SC_MOUSE)) { /* assert(sc != NULL) */ if (sc->console[SC_VTY(dev) - sc->first_vty] == NULL) { @@ -534,7 +538,7 @@ scopen(dev_t dev, int flag, int mode, struct proc *p) = sc->console[SC_VTY(dev) - sc->first_vty]->ysize; } } - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return error; } int |