diff --git a/sys/arch/hp300/dev/dca.c b/sys/arch/hp300/dev/dca.c index 6bb6ea562c58..09b55388905b 100644 --- a/sys/arch/hp300/dev/dca.c +++ b/sys/arch/hp300/dev/dca.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)dca.c 7.12 (Berkeley) 6/27/91 - * $Id: dca.c,v 1.10 1994/02/06 00:44:32 mycroft Exp $ + * $Id: dca.c,v 1.11 1994/02/06 01:08:36 mycroft Exp $ */ #include "dca.h" @@ -99,7 +99,6 @@ struct speedtab dcaspeedtab[] = { -1, -1 }; -extern struct tty *constty; #ifdef KGDB #include "machine/remote-sl.h" @@ -197,7 +196,7 @@ dcaopen(dev, flag, mode, p) unit = UNIT(dev); if (unit >= NDCA || (dca_active & (1 << unit)) == 0) return (ENXIO); - if(!dca_tty[unit]) + if (!dca_tty[unit]) tp = dca_tty[unit] = ttymalloc(); else tp = dca_tty[unit]; @@ -259,8 +258,10 @@ dcaclose(dev, flag, mode, p) (tp->t_state&TS_ISOPEN) == 0) (void) dcamctl(dev, 0, DMSET); ttyclose(tp); +#if 0 ttyfree(tp); dca_tty[unit] = (struct tty *)NULL; +#endif return (0); } @@ -277,17 +278,8 @@ dcawrite(dev, uio, flag) dev_t dev; struct uio *uio; { - int unit = UNIT(dev); - register struct tty *tp = dca_tty[unit]; + register struct tty *tp = dca_tty[UNIT(dev)]; - /* - * (XXX) We disallow virtual consoles if the physical console is - * a serial port. This is in case there is a display attached that - * is not the console. In that situation we don't need/want the X - * server taking over the console. - */ - if (constty && unit == dcaconsole) - constty = NULL; return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); } diff --git a/sys/arch/hp300/dev/dcm.c b/sys/arch/hp300/dev/dcm.c index 760feb9c5ad3..d6af59001551 100644 --- a/sys/arch/hp300/dev/dcm.c +++ b/sys/arch/hp300/dev/dcm.c @@ -37,7 +37,7 @@ * * from: Utah Hdr: dcm.c 1.26 91/01/21 * from: @(#)dcm.c 7.14 (Berkeley) 6/27/91 - * $Id: dcm.c,v 1.11 1994/02/06 00:44:34 mycroft Exp $ + * $Id: dcm.c,v 1.12 1994/02/06 01:08:37 mycroft Exp $ */ /* @@ -142,7 +142,6 @@ int dcmconsinit; int dcmdefaultrate = DEFAULT_BAUD_RATE; int dcmconbrdbusy = 0; int dcmmajor; -extern struct tty *constty; #ifdef KGDB /* @@ -351,7 +350,7 @@ dcmopen(dev, flag, mode, p) brd = BOARD(unit); if (unit >= NDCMLINE || (dcm_active & (1 << brd)) == 0) return (ENXIO); - if(!dcm_tty[unit]) + if (!dcm_tty[unit]) tp = dcm_tty[unit] = ttymalloc(); else tp = dcm_tty[unit]; @@ -425,8 +424,10 @@ dcmclose(dev, flag, mode, p) unit, tp->t_state, tp->t_flags); #endif ttyclose(tp); +#if 0 ttyfree(tp); dcm_tty[unit] = (struct tty *)NULL; +#endif return (0); } @@ -434,9 +435,8 @@ dcmread(dev, uio, flag) dev_t dev; struct uio *uio; { - register struct tty *tp; + register struct tty *tp = dcm_tty[UNIT(dev)]; - tp = dcm_tty[UNIT(dev)]; return ((*linesw[tp->t_line].l_read)(tp, uio, flag)); } @@ -444,18 +444,8 @@ dcmwrite(dev, uio, flag) dev_t dev; struct uio *uio; { - int unit = UNIT(dev); - register struct tty *tp; + register struct tty *tp = dcm_tty[UNIT(dev)]; - tp = dcm_tty[unit]; - /* - * XXX we disallow virtual consoles if the physical console is - * a serial port. This is in case there is a display attached that - * is not the console. In that situation we don't need/want the X - * server taking over the console. - */ - if (constty && unit == dcmconsole) - constty = NULL; return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); } diff --git a/sys/arch/hp300/dev/ite.c b/sys/arch/hp300/dev/ite.c index cd81f243f339..310f1ae5b03e 100644 --- a/sys/arch/hp300/dev/ite.c +++ b/sys/arch/hp300/dev/ite.c @@ -37,7 +37,7 @@ * * from: Utah Hdr: ite.c 1.1 90/07/09 * from: @(#)ite.c 7.6 (Berkeley) 5/16/91 - * $Id: ite.c,v 1.16 1994/02/06 00:44:36 mycroft Exp $ + * $Id: ite.c,v 1.17 1994/02/06 01:08:39 mycroft Exp $ */ /* @@ -110,7 +110,6 @@ struct ite_softc *kbd_ite = NULL; struct ite_softc ite_softc[NITE]; void itestart(); -extern struct tty *constty; /* * Primary attribute buffer to be used by the first bitmapped console @@ -220,7 +219,7 @@ iteopen(dev, mode, devtype, p) register int error; int first = 0; - if(!ite_tty[unit]) + if (!ite_tty[unit]) tp = ite_tty[unit] = ttymalloc(); else tp = ite_tty[unit]; @@ -266,8 +265,10 @@ iteclose(dev, flag, mode, p) (*linesw[tp->t_line].l_close)(tp, flag); ttyclose(tp); iteoff(dev, 0); +#if 0 ttyfree(tp); ite_tty[UNIT(dev)] = (struct tty *)NULL; +#endif return(0); } @@ -284,12 +285,8 @@ itewrite(dev, uio, flag) dev_t dev; struct uio *uio; { - int unit = UNIT(dev); - register struct tty *tp = ite_tty[unit]; + register struct tty *tp = ite_tty[UNIT(dev)]; - if ((ite_softc[unit].flags & ITE_ISCONS) && constty && - (constty->t_state&(TS_CARR_ON|TS_ISOPEN))==(TS_CARR_ON|TS_ISOPEN)) - tp = constty; return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); }