Adapt to new line discipline scheme.
This commit is contained in:
parent
5d8e9b343a
commit
8c3f6a0d10
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pccons.c,v 1.142 2000/10/12 22:36:30 hpeyerl Exp $ */
|
||||
/* $NetBSD: pccons.c,v 1.143 2000/11/02 00:37:56 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -839,7 +839,7 @@ pcopen(dev, flag, mode, p)
|
||||
return (EBUSY);
|
||||
tp->t_state |= TS_CARR_ON;
|
||||
|
||||
return ((*linesw[tp->t_line].l_open)(dev, tp));
|
||||
return ((*tp->t_linesw->l_open)(dev, tp));
|
||||
}
|
||||
|
||||
int
|
||||
@ -853,7 +853,7 @@ pcclose(dev, flag, mode, p)
|
||||
|
||||
if (tp == NULL)
|
||||
return (0);
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
#ifdef notyet /* XXX */
|
||||
ttyfree(tp);
|
||||
@ -870,7 +870,7 @@ pcread(dev, uio, flag)
|
||||
struct pc_softc *sc = pc_cd.cd_devs[PCUNIT(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -882,7 +882,7 @@ pcwrite(dev, uio, flag)
|
||||
struct pc_softc *sc = pc_cd.cd_devs[PCUNIT(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -916,7 +916,7 @@ pcinput(arg, data)
|
||||
cp = strans(data);
|
||||
if (cp)
|
||||
do
|
||||
(*linesw[tp->t_line].l_rint)(*cp++, tp);
|
||||
(*tp->t_linesw->l_rint)(*cp++, tp);
|
||||
while (*cp);
|
||||
}
|
||||
#else
|
||||
@ -938,7 +938,7 @@ pcintr(arg)
|
||||
return (1);
|
||||
if (cp)
|
||||
do
|
||||
(*linesw[tp->t_line].l_rint)(*cp++, tp);
|
||||
(*tp->t_linesw->l_rint)(*cp++, tp);
|
||||
while (*cp);
|
||||
} while (inb(IO_KBD + KBSTATP) & KBS_DIB);
|
||||
return (1);
|
||||
@ -957,7 +957,7 @@ pcioctl(dev, cmd, data, flag, p)
|
||||
struct tty *tp = sc->sc_tty;
|
||||
int error;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: siotty.c,v 1.4 2000/03/06 21:36:09 thorpej Exp $ */
|
||||
/* $NetBSD: siotty.c,v 1.5 2000/11/02 00:37:57 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.4 2000/03/06 21:36:09 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.5 2000/11/02 00:37:57 eeh Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -182,7 +182,7 @@ siottyintr(chan)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
(*linesw[tp->t_line].l_rint)(code, tp);
|
||||
(*tp->t_linesw->l_rint)(code, tp);
|
||||
} while ((rr = getsiocsr(sio)) & RR_RXRDY);
|
||||
}
|
||||
if (rr & RR_TXRDY) {
|
||||
@ -190,7 +190,7 @@ siottyintr(chan)
|
||||
if (tp != NULL) {
|
||||
tp->t_state &= ~(TS_BUSY|TS_FLUSH);
|
||||
if (tp->t_line)
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
else
|
||||
siostart(tp);
|
||||
}
|
||||
@ -405,7 +405,7 @@ sioopen(dev, flag, mode, p)
|
||||
error = ttyopen(tp, 0, (flag & O_NONBLOCK));
|
||||
if (error > 0)
|
||||
return error;
|
||||
return (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
return (*tp->t_linesw->l_open)(dev, tp);
|
||||
}
|
||||
|
||||
int
|
||||
@ -418,7 +418,7 @@ sioclose(dev, flag, mode, p)
|
||||
struct tty *tp = sc->sc_tty;
|
||||
int s;
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
|
||||
s = spltty();
|
||||
siomctl(sc, TIOCM_BREAK, DMBIC);
|
||||
@ -443,7 +443,7 @@ sioread(dev, uio, flag)
|
||||
struct siotty_softc *sc = siotty_cd.cd_devs[minor(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return (*linesw[tp->t_line].l_read)(tp, uio, flag);
|
||||
return (*tp->t_linesw->l_read)(tp, uio, flag);
|
||||
}
|
||||
|
||||
int
|
||||
@ -455,7 +455,7 @@ siowrite(dev, uio, flag)
|
||||
struct siotty_softc *sc = siotty_cd.cd_devs[minor(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return (*linesw[tp->t_line].l_write)(tp, uio, flag);
|
||||
return (*tp->t_linesw->l_write)(tp, uio, flag);
|
||||
}
|
||||
|
||||
int
|
||||
@ -470,7 +470,7 @@ sioioctl(dev, cmd, data, flag, p)
|
||||
struct tty *tp = sc->sc_tty;
|
||||
int error;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return error;
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ofcons.c,v 1.4 2000/03/23 06:40:34 thorpej Exp $ */
|
||||
/* $NetBSD: ofcons.c,v 1.5 2000/11/02 00:37:57 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -141,7 +141,7 @@ ofcopen(dev, flag, mode, p)
|
||||
return EBUSY;
|
||||
tp->t_state |= TS_CARR_ON;
|
||||
|
||||
return (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
return (*tp->t_linesw->l_open)(dev, tp);
|
||||
}
|
||||
|
||||
int
|
||||
@ -153,7 +153,7 @@ ofcclose(dev, flag, mode, p)
|
||||
struct ofcons_softc *sc = macofcons_cd.cd_devs[minor(dev)];
|
||||
struct tty *tp = sc->of_tty;
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
return 0;
|
||||
}
|
||||
@ -167,7 +167,7 @@ ofcread(dev, uio, flag)
|
||||
struct ofcons_softc *sc = macofcons_cd.cd_devs[minor(dev)];
|
||||
struct tty *tp = sc->of_tty;
|
||||
|
||||
return (*linesw[tp->t_line].l_read)(tp, uio, flag);
|
||||
return (*tp->t_linesw->l_read)(tp, uio, flag);
|
||||
}
|
||||
|
||||
int
|
||||
@ -179,7 +179,7 @@ ofcwrite(dev, uio, flag)
|
||||
struct ofcons_softc *sc = macofcons_cd.cd_devs[minor(dev)];
|
||||
struct tty *tp = sc->of_tty;
|
||||
|
||||
return (*linesw[tp->t_line].l_write)(tp, uio, flag);
|
||||
return (*tp->t_linesw->l_write)(tp, uio, flag);
|
||||
}
|
||||
|
||||
int
|
||||
@ -194,7 +194,7 @@ ofcioctl(dev, cmd, data, flag, p)
|
||||
struct tty *tp = sc->of_tty;
|
||||
int error;
|
||||
|
||||
if ((error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p)) >= 0)
|
||||
if ((error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p)) >= 0)
|
||||
return error;
|
||||
if ((error = ttioctl(tp, cmd, data, flag, p)) >= 0)
|
||||
return error;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: z8530tty.c,v 1.6 2000/03/26 08:29:12 tsubai Exp $ */
|
||||
/* $NetBSD: z8530tty.c,v 1.7 2000/11/02 00:37:57 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999
|
||||
@ -540,7 +540,7 @@ zsopen(dev, flags, mode, p)
|
||||
if (error)
|
||||
goto bad;
|
||||
|
||||
error = (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
error = (*tp->t_linesw->l_open)(dev, tp);
|
||||
if (error)
|
||||
goto bad;
|
||||
|
||||
@ -575,7 +575,7 @@ zsclose(dev, flags, mode, p)
|
||||
if (!ISSET(tp->t_state, TS_ISOPEN))
|
||||
return 0;
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flags);
|
||||
(*tp->t_linesw->l_close)(tp, flags);
|
||||
ttyclose(tp);
|
||||
|
||||
if (!ISSET(tp->t_state, TS_ISOPEN) && tp->t_wopen == 0) {
|
||||
@ -602,7 +602,7 @@ zsread(dev, uio, flags)
|
||||
struct zstty_softc *zst = zstty_cd.cd_devs[ZSUNIT(dev)];
|
||||
struct tty *tp = zst->zst_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flags));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flags));
|
||||
}
|
||||
|
||||
int
|
||||
@ -614,7 +614,7 @@ zswrite(dev, uio, flags)
|
||||
struct zstty_softc *zst = zstty_cd.cd_devs[ZSUNIT(dev)];
|
||||
struct tty *tp = zst->zst_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flags));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flags));
|
||||
}
|
||||
|
||||
int
|
||||
@ -631,7 +631,7 @@ zsioctl(dev, cmd, data, flag, p)
|
||||
int error;
|
||||
int s;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
|
||||
@ -1333,7 +1333,7 @@ zstty_rxsoft(zst, tp)
|
||||
struct tty *tp;
|
||||
{
|
||||
struct zs_chanstate *cs = zst->zst_cs;
|
||||
int (*rint) __P((int c, struct tty *tp)) = linesw[tp->t_line].l_rint;
|
||||
int (*rint) __P((int c, struct tty *tp)) = tp->t_linesw->l_rint;
|
||||
u_char *get, *end;
|
||||
u_int cc, scc;
|
||||
u_char rr1;
|
||||
@ -1436,7 +1436,7 @@ zstty_txsoft(zst, tp)
|
||||
CLR(tp->t_state, TS_FLUSH);
|
||||
else
|
||||
ndflush(&tp->t_outq, (int)(zst->zst_tba - tp->t_outq.c_cf));
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
}
|
||||
|
||||
integrate void
|
||||
@ -1458,14 +1458,14 @@ zstty_stsoft(zst, tp)
|
||||
/*
|
||||
* Inform the tty layer that carrier detect changed.
|
||||
*/
|
||||
(void) (*linesw[tp->t_line].l_modem)(tp, ISSET(rr0, ZSRR0_DCD));
|
||||
(void) (*tp->t_linesw->l_modem)(tp, ISSET(rr0, ZSRR0_DCD));
|
||||
}
|
||||
|
||||
if (ISSET(delta, cs->cs_rr0_cts)) {
|
||||
/* Block or unblock output according to flow control. */
|
||||
if (ISSET(rr0, cs->cs_rr0_cts)) {
|
||||
zst->zst_tx_stopped = 0;
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
} else {
|
||||
zst->zst_tx_stopped = 1;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bmcons.c,v 1.7 2000/06/29 07:59:30 mrg Exp $ */
|
||||
/* $NetBSD: bmcons.c,v 1.8 2000/11/02 00:37:57 eeh Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -242,7 +242,7 @@ bmcnopen(dev, flag, mode, p)
|
||||
*/
|
||||
(void) cnmctl(CN_ON, DMSET);
|
||||
tp->t_state |= TS_CARR_ON;
|
||||
return ((*linesw[tp->t_line].l_open)(dev, tp));
|
||||
return ((*tp->t_linesw->l_open)(dev, tp));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -257,7 +257,7 @@ bmcnclose(dev, flag, mode, p)
|
||||
{
|
||||
register struct tty *tp = &bmcn_tty[0];
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
(void) cnmctl(CN_BRK, DMBIC);
|
||||
ttyclose(tp);
|
||||
return (0);
|
||||
@ -272,7 +272,7 @@ bmcnread(dev, uio, flag)
|
||||
{
|
||||
register struct tty *tp = &bmcn_tty[0];
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
@ -284,7 +284,7 @@ bmcnwrite(dev, uio, flag)
|
||||
{
|
||||
register struct tty *tp = &bmcn_tty[0];
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -315,7 +315,7 @@ _bmcnrint(buf, n)
|
||||
* Loop fetching characters from the silo for console
|
||||
* until there are no more in the silo.
|
||||
*/
|
||||
rint = linesw[tp->t_line].l_rint;
|
||||
rint = tp->t_linesw->l_rint;
|
||||
while (--n >= 0)
|
||||
(*rint)(*buf++, tp);
|
||||
bmcn_enable();
|
||||
@ -336,7 +336,7 @@ bmcnioctl(dev, cmd, data, flag, p)
|
||||
register struct tty *tp = &bmcn_tty[0];
|
||||
int error;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
@ -500,7 +500,7 @@ _bmcnxint(count)
|
||||
ndflush(&tp->t_outq, count);
|
||||
(void) splx(s);
|
||||
if (tp->t_line)
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
else
|
||||
bmcnstart(tp);
|
||||
}
|
||||
@ -653,7 +653,7 @@ _bmcnsint(stat)
|
||||
if (stat & OVERRUN_ERROR)
|
||||
printf("console: fifo overflow\n");
|
||||
if (stat & RBREAK)
|
||||
(*linesw[tp->t_line].l_rint)
|
||||
(*tp->t_linesw->l_rint)
|
||||
(tp->t_flags & RAW ? '\0' : tp->t_cc[VINTR], tp);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: scn.c,v 1.44 2000/07/14 08:18:49 matthias Exp $ */
|
||||
/* $NetBSD: scn.c,v 1.45 2000/11/02 00:42:38 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997 Philip L. Budne.
|
||||
@ -1166,7 +1166,7 @@ scnopen(dev, flag, mode, p)
|
||||
}
|
||||
splx(s);
|
||||
|
||||
error = (*linesw[tp->t_line].l_open) (dev, tp);
|
||||
error = (*tp->t_linesw->l_open) (dev, tp);
|
||||
if (error && hwset) {
|
||||
scn_rxdisable(sc);
|
||||
SCN_OP_BIC(sc, sc->sc_op_rts | sc->sc_op_dtr);
|
||||
@ -1190,7 +1190,7 @@ scnclose(dev, flag, mode, p)
|
||||
if ((tp->t_state & TS_ISOPEN) == 0)
|
||||
return 0;
|
||||
|
||||
(*linesw[tp->t_line].l_close) (tp, flag);
|
||||
(*tp->t_linesw->l_close) (tp, flag);
|
||||
|
||||
#ifdef KGDB
|
||||
/* do not disable interrupts if debugging */
|
||||
@ -1226,7 +1226,7 @@ scnread(dev, uio, flag)
|
||||
register struct scn_softc *sc = SOFTC(DEV_UNIT(dev));
|
||||
register struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_read) (tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read) (tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -1238,7 +1238,7 @@ scnwrite(dev, uio, flag)
|
||||
register struct scn_softc *sc = SOFTC(DEV_UNIT(dev));
|
||||
register struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_write) (tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write) (tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -1595,7 +1595,7 @@ scnsoft(arg)
|
||||
c = TTY_FE | 0;
|
||||
sc->sc_breaks++;
|
||||
}
|
||||
(*linesw[tp->t_line].l_rint) (c, tp);
|
||||
(*tp->t_linesw->l_rint) (c, tp);
|
||||
|
||||
if (sc->sc_rx_blocked && n < SCN_RING_THRESH) {
|
||||
int s = splrtty();
|
||||
@ -1634,7 +1634,7 @@ scnioctl(dev, cmd, data, flag, p)
|
||||
register struct tty *tp = sc->sc_tty;
|
||||
register int error;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl) (tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl) (tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dc.c,v 1.63 2000/03/23 06:43:01 thorpej Exp $ */
|
||||
/* $NetBSD: dc.c,v 1.64 2000/11/02 00:42:38 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: dc.c,v 1.63 2000/03/23 06:43:01 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dc.c,v 1.64 2000/11/02 00:42:38 eeh Exp $");
|
||||
|
||||
/*
|
||||
* devDC7085.c --
|
||||
@ -511,7 +511,7 @@ dcopen(dev, flag, mode, p)
|
||||
splx(s);
|
||||
if (error)
|
||||
return (error);
|
||||
error = (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
error = (*tp->t_linesw->l_open)(dev, tp);
|
||||
return (error);
|
||||
}
|
||||
|
||||
@ -538,7 +538,7 @@ dcclose(dev, flag, mode, p)
|
||||
ttyoutput(0, tp);
|
||||
}
|
||||
splx(s);
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
if ((tp->t_cflag & HUPCL) || tp->t_wopen ||
|
||||
!(tp->t_state & TS_ISOPEN))
|
||||
(void) dcmctl(dev, 0, DMSET);
|
||||
@ -564,7 +564,7 @@ dcread(dev, uio, flag)
|
||||
}
|
||||
#endif /* HW_FLOW_CONTROL */
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -577,7 +577,7 @@ dcwrite(dev, uio, flag)
|
||||
|
||||
sc = dc_cd.cd_devs[DCUNIT(dev)];
|
||||
tp = sc->dc_tty[DCLINE(dev)];
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -613,7 +613,7 @@ dcioctl(dev, cmd, data, flag, p)
|
||||
sc = dc_cd.cd_devs[unit];
|
||||
tp = sc->dc_tty[line];
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
@ -846,7 +846,7 @@ dcrint(sc)
|
||||
(void) dcmctl(tp->t_dev, DML_RTS, DMBIC);
|
||||
}
|
||||
#endif /* HWW_FLOW_CONTROL */
|
||||
(*linesw[tp->t_line].l_rint)(cc, tp);
|
||||
(*tp->t_linesw->l_rint)(cc, tp);
|
||||
}
|
||||
DELAY(10);
|
||||
}
|
||||
@ -909,7 +909,7 @@ dcxint(tp)
|
||||
dp->p_end = dp->p_mem = tp->t_outq.c_cf;
|
||||
}
|
||||
if (tp->t_line)
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
else
|
||||
dcstart(tp);
|
||||
if (tp->t_outq.c_cc == 0 || !(tp->t_state & TS_BUSY)) {
|
||||
@ -1137,9 +1137,9 @@ dcscan(arg)
|
||||
if ((dcaddr->dc_msr & dsr) || (sc->dcsoftCAR & (1 << unit))) {
|
||||
/* carrier present */
|
||||
if (!(tp->t_state & TS_CARR_ON))
|
||||
(void)(*linesw[tp->t_line].l_modem)(tp, 1);
|
||||
(void)(*tp->t_linesw->l_modem)(tp, 1);
|
||||
} else if ((tp->t_state & TS_CARR_ON) &&
|
||||
(*linesw[tp->t_line].l_modem)(tp, 0) == 0)
|
||||
(*tp->t_linesw->l_modem)(tp, 0) == 0)
|
||||
dcaddr->dc_tcr &= ~dtr;
|
||||
#ifdef HW_FLOW_CONTROL
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dtop.c,v 1.53 2000/04/26 04:16:17 mhitch Exp $ */
|
||||
/* $NetBSD: dtop.c,v 1.54 2000/11/02 00:42:38 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -94,7 +94,7 @@ SOFTWARE.
|
||||
********************************************************/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: dtop.c,v 1.53 2000/04/26 04:16:17 mhitch Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dtop.c,v 1.54 2000/11/02 00:42:38 eeh Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "rasterconsole.h"
|
||||
@ -340,7 +340,7 @@ dtopopen(dev, flag, mode, p)
|
||||
splx(s);
|
||||
if (error)
|
||||
return (error);
|
||||
error = (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
error = (*tp->t_linesw->l_open)(dev, tp);
|
||||
|
||||
#if (RASTERCONSOLE > 0) && defined(RCONS_BRAINDAMAGE)
|
||||
/* handle raster console specially */
|
||||
@ -364,7 +364,7 @@ dtopclose(dev, flag, mode, p)
|
||||
|
||||
unit = minor(dev);
|
||||
tp = DTOP_TTY(unit);
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
return (ttyclose(tp));
|
||||
}
|
||||
|
||||
@ -376,7 +376,7 @@ dtopread(dev, uio, flag)
|
||||
struct tty *tp;
|
||||
|
||||
tp = DTOP_TTY(minor(dev));
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -387,7 +387,7 @@ dtopwrite(dev, uio, flag)
|
||||
struct tty *tp;
|
||||
|
||||
tp = DTOP_TTY(minor(dev));
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -412,7 +412,7 @@ dtopioctl(dev, cmd, data, flag, p)
|
||||
int error;
|
||||
|
||||
tp = DTOP_TTY(unit);
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
@ -943,7 +943,7 @@ dtop_keyboard_handler(dev, msg, event, outc)
|
||||
} else if (cp /*&& tp != NULL*/) {
|
||||
for (; cl; cl--, cp++) {
|
||||
#if 0
|
||||
(*linesw[tp->t_line].l_rint)(*cp, tp);
|
||||
(*tp->t_linesw->l_rint)(*cp, tp);
|
||||
#else
|
||||
rcons_input(0, *cp);
|
||||
#endif
|
||||
@ -1000,7 +1000,7 @@ dtop_keyboard_repeat(arg)
|
||||
if ((cp = lk_mapchar(KEY_REPEAT, &cl)) != NULL) {
|
||||
for (; cl; cl--, cp++) {
|
||||
#if 0
|
||||
(*linesw[tp->t_line].l_rint)(*cp, tp);
|
||||
(*tp->t_linesw->l_rint)(*cp, tp);
|
||||
#else
|
||||
rcons_input(0, *cp);
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rcons.c,v 1.43 2000/06/28 11:03:26 ad Exp $ */
|
||||
/* $NetBSD: rcons.c,v 1.44 2000/11/02 00:42:39 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995
|
||||
@ -300,7 +300,7 @@ rconsopen(dev, flag, mode, p)
|
||||
} else if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0)
|
||||
return (EBUSY);
|
||||
|
||||
status = (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
status = (*tp->t_linesw->l_open)(dev, tp);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ rconsclose(dev, flag, mode, p)
|
||||
{
|
||||
struct tty *tp = &rcons_tty [0];
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
|
||||
return (0);
|
||||
@ -328,7 +328,7 @@ rconsread(dev, uio, flag)
|
||||
{
|
||||
struct tty *tp = &rcons_tty [0];
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
@ -341,7 +341,7 @@ rconswrite(dev, uio, flag)
|
||||
struct tty *tp;
|
||||
|
||||
tp = &rcons_tty [0];
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -365,7 +365,7 @@ rconsioctl(dev, cmd, data, flag, p)
|
||||
int error;
|
||||
|
||||
tp = &rcons_tty [0];
|
||||
if ((error = linesw[tp->t_line].l_ioctl(tp, cmd, data, flag, p)) >= 0)
|
||||
if ((error = tp->t_linesw->l_ioctl(tp, cmd, data, flag, p)) >= 0)
|
||||
return (error);
|
||||
if ((error = ttioctl(tp, cmd, data, flag, p)) >= 0)
|
||||
return (error);
|
||||
@ -459,7 +459,7 @@ rcons_later(tpaddr)
|
||||
(*(fbconstty->t_oproc)) (tp); /* XXX */
|
||||
|
||||
tp->t_state &= ~TS_BUSY;
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
splx(s);
|
||||
}
|
||||
#endif /* notyet */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: scc.c,v 1.65 2000/03/06 21:36:11 thorpej Exp $ */
|
||||
/* $NetBSD: scc.c,v 1.66 2000/11/02 00:42:39 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: scc.c,v 1.65 2000/03/06 21:36:11 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: scc.c,v 1.66 2000/11/02 00:42:39 eeh Exp $");
|
||||
|
||||
/*
|
||||
* Intel 82530 dual usart chip driver. Supports the serial port(s) on the
|
||||
@ -677,7 +677,7 @@ sccopen(dev, flag, mode, p)
|
||||
if (error)
|
||||
goto bad;
|
||||
|
||||
error = (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
error = (*tp->t_linesw->l_open)(dev, tp);
|
||||
|
||||
if (error)
|
||||
goto bad;
|
||||
@ -702,7 +702,7 @@ sccclose(dev, flag, mode, p)
|
||||
sc->scc_wreg[line].wr5 &= ~ZSWR5_BREAK;
|
||||
ttyoutput(0, tp);
|
||||
}
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
if ((tp->t_cflag & HUPCL) || tp->t_wopen ||
|
||||
!(tp->t_state & TS_ISOPEN))
|
||||
(void) sccmctl(dev, 0, DMSET);
|
||||
@ -720,7 +720,7 @@ sccread(dev, uio, flag)
|
||||
|
||||
sc = scc_cd.cd_devs[SCCUNIT(dev)]; /* XXX*/
|
||||
tp = sc->scc_tty[SCCLINE(dev)];
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -734,7 +734,7 @@ sccwrite(dev, uio, flag)
|
||||
|
||||
sc = scc_cd.cd_devs[SCCUNIT(dev)]; /* XXX*/
|
||||
tp = sc->scc_tty[SCCLINE(dev)];
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -767,7 +767,7 @@ sccioctl(dev, cmd, data, flag, p)
|
||||
line = SCCLINE(dev);
|
||||
sc = scc_cd.cd_devs[SCCUNIT(dev)];
|
||||
tp = sc->scc_tty[line];
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
@ -1000,7 +1000,7 @@ scc_txintr(sc, chan, regs)
|
||||
dp->p_end = dp->p_mem = tp->t_outq.c_cf;
|
||||
}
|
||||
if (tp->t_line)
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
else
|
||||
sccstart(tp);
|
||||
if (tp->t_outq.c_cc == 0 || !(tp->t_state & TS_BUSY)) {
|
||||
@ -1093,7 +1093,7 @@ scc_rxintr(sc, chan, regs, unit)
|
||||
if (rr1 & ZSRR1_FE)
|
||||
cc |= TTY_FE;
|
||||
}
|
||||
(*linesw[tp->t_line].l_rint)(cc, tp);
|
||||
(*tp->t_linesw->l_rint)(cc, tp);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1374,9 +1374,9 @@ scc_modem_intr(dev)
|
||||
if (car) {
|
||||
/* carrier present */
|
||||
if (!(tp->t_state & TS_CARR_ON))
|
||||
(void)(*linesw[tp->t_line].l_modem)(tp, 1);
|
||||
(void)(*tp->t_linesw->l_modem)(tp, 1);
|
||||
} else if (tp->t_state & TS_CARR_ON)
|
||||
(void)(*linesw[tp->t_line].l_modem)(tp, 0);
|
||||
(void)(*tp->t_linesw->l_modem)(tp, 0);
|
||||
}
|
||||
splx(s);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pccons.c,v 1.4 2000/06/26 04:55:57 simonb Exp $ */
|
||||
/* $NetBSD: pccons.c,v 1.5 2000/11/02 00:42:39 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -633,7 +633,7 @@ pcopen(dev, flag, mode, p)
|
||||
return (EBUSY);
|
||||
tp->t_state |= TS_CARR_ON;
|
||||
|
||||
return ((*linesw[tp->t_line].l_open)(dev, tp));
|
||||
return ((*tp->t_linesw->l_open)(dev, tp));
|
||||
}
|
||||
|
||||
int
|
||||
@ -645,7 +645,7 @@ pcclose(dev, flag, mode, p)
|
||||
struct pc_softc *sc = pc_cd.cd_devs[PCUNIT(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
#ifdef notyet
|
||||
ttyfree(tp);
|
||||
@ -662,7 +662,7 @@ pcread(dev, uio, flag)
|
||||
struct pc_softc *sc = pc_cd.cd_devs[PCUNIT(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -674,7 +674,7 @@ pcwrite(dev, uio, flag)
|
||||
struct pc_softc *sc = pc_cd.cd_devs[PCUNIT(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -710,7 +710,7 @@ pcintr(arg)
|
||||
return (1);
|
||||
if (cp)
|
||||
do
|
||||
(*linesw[tp->t_line].l_rint)(*cp++, tp);
|
||||
(*tp->t_linesw->l_rint)(*cp++, tp);
|
||||
while (*cp);
|
||||
} while (isa_inb(IO_KBD + KBSTATP) & KBS_DIB);
|
||||
return (1);
|
||||
@ -728,7 +728,7 @@ pcioctl(dev, cmd, data, flag, p)
|
||||
struct tty *tp = sc->sc_tty;
|
||||
int error;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: console.c,v 1.1 2000/06/14 16:02:44 soren Exp $ */
|
||||
/* $NetBSD: console.c,v 1.2 2000/11/02 00:42:39 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
@ -158,7 +158,7 @@ arcsopen(dev, flag, mode, p)
|
||||
|
||||
splx(s);
|
||||
|
||||
error = (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
error = (*tp->t_linesw->l_open)(dev, tp);
|
||||
if (error == 0 && setuptimeout) {
|
||||
callout_reset(&arcs_ch, 1, arcs_poll, tp);
|
||||
}
|
||||
@ -175,7 +175,7 @@ arcsclose(dev, flag, mode, p)
|
||||
struct tty *tp = arcs_tty[unit];
|
||||
|
||||
callout_stop(&arcs_ch);
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
return 0;
|
||||
}
|
||||
@ -188,7 +188,7 @@ arcsread(dev, uio, flag)
|
||||
{
|
||||
struct tty *tp = arcs_tty[minor(dev)];
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -199,7 +199,7 @@ arcswrite(dev, uio, flag)
|
||||
{
|
||||
struct tty *tp = arcs_tty[minor(dev)];
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -214,7 +214,7 @@ arcsioctl(dev, cmd, data, flag, p)
|
||||
struct tty *tp = arcs_tty[unit];
|
||||
int error;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return error;
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
@ -280,7 +280,7 @@ arcs_poll(v)
|
||||
|
||||
while (arcs_cnlookc(tp->t_dev, &c)) {
|
||||
if (tp->t_state & TS_ISOPEN)
|
||||
l_r = (*linesw[tp->t_line].l_rint)(c, tp);
|
||||
l_r = (*tp->t_linesw->l_rint)(c, tp);
|
||||
}
|
||||
callout_reset(&arcs_ch, 1, arcs_poll, tp);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sci.c,v 1.9 2000/06/19 09:32:00 msaitoh Exp $ */
|
||||
/* $NetBSD: sci.c,v 1.10 2000/11/02 00:42:40 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu. All rights reserved.
|
||||
@ -859,7 +859,7 @@ sciopen(dev, flag, mode, p)
|
||||
if (error)
|
||||
goto bad;
|
||||
|
||||
error = (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
error = (*tp->t_linesw->l_open)(dev, tp);
|
||||
if (error)
|
||||
goto bad;
|
||||
|
||||
@ -883,7 +883,7 @@ sciclose(dev, flag, mode, p)
|
||||
if (!ISSET(tp->t_state, TS_ISOPEN))
|
||||
return (0);
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
|
||||
if (ISSET(sc->sc_dev.dv_flags, DVF_ACTIVE) == 0)
|
||||
@ -901,7 +901,7 @@ sciread(dev, uio, flag)
|
||||
struct sci_softc *sc = sci_cd.cd_devs[SCIUNIT(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -913,7 +913,7 @@ sciwrite(dev, uio, flag)
|
||||
struct sci_softc *sc = sci_cd.cd_devs[SCIUNIT(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -942,7 +942,7 @@ sciioctl(dev, cmd, data, flag, p)
|
||||
if (ISSET(sc->sc_dev.dv_flags, DVF_ACTIVE) == 0)
|
||||
return (EIO);
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
|
||||
@ -1078,7 +1078,7 @@ sci_rxsoft(sc, tp)
|
||||
struct sci_softc *sc;
|
||||
struct tty *tp;
|
||||
{
|
||||
int (*rint) __P((int c, struct tty *tp)) = linesw[tp->t_line].l_rint;
|
||||
int (*rint) __P((int c, struct tty *tp)) = tp->t_linesw->l_rint;
|
||||
u_char *get, *end;
|
||||
u_int cc, scc;
|
||||
u_char ssr;
|
||||
@ -1170,7 +1170,7 @@ sci_txsoft(sc, tp)
|
||||
CLR(tp->t_state, TS_FLUSH);
|
||||
else
|
||||
ndflush(&tp->t_outq, (int)(sc->sc_tba - tp->t_outq.c_cf));
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
}
|
||||
|
||||
integrate void
|
||||
@ -1193,14 +1193,14 @@ sci_stsoft(sc, tp)
|
||||
/*
|
||||
* Inform the tty layer that carrier detect changed.
|
||||
*/
|
||||
(void) (*linesw[tp->t_line].l_modem)(tp, ISSET(msr, MSR_DCD));
|
||||
(void) (*tp->t_linesw->l_modem)(tp, ISSET(msr, MSR_DCD));
|
||||
}
|
||||
|
||||
if (ISSET(delta, sc->sc_msr_cts)) {
|
||||
/* Block or unblock output according to flow control. */
|
||||
if (ISSET(msr, sc->sc_msr_cts)) {
|
||||
sc->sc_tx_stopped = 0;
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
} else {
|
||||
sc->sc_tx_stopped = 1;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: scif.c,v 1.12 2000/10/31 01:08:41 msaitoh Exp $ */
|
||||
/* $NetBSD: scif.c,v 1.13 2000/11/02 00:42:40 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu. All rights reserved.
|
||||
@ -862,7 +862,7 @@ scifopen(dev, flag, mode, p)
|
||||
if (error)
|
||||
goto bad;
|
||||
|
||||
error = (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
error = (*tp->t_linesw->l_open)(dev, tp);
|
||||
if (error)
|
||||
goto bad;
|
||||
|
||||
@ -886,7 +886,7 @@ scifclose(dev, flag, mode, p)
|
||||
if (!ISSET(tp->t_state, TS_ISOPEN))
|
||||
return (0);
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
|
||||
if (ISSET(sc->sc_dev.dv_flags, DVF_ACTIVE) == 0)
|
||||
@ -904,7 +904,7 @@ scifread(dev, uio, flag)
|
||||
struct scif_softc *sc = scif_cd.cd_devs[SCIFUNIT(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -916,7 +916,7 @@ scifwrite(dev, uio, flag)
|
||||
struct scif_softc *sc = scif_cd.cd_devs[SCIFUNIT(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -945,7 +945,7 @@ scifioctl(dev, cmd, data, flag, p)
|
||||
if (ISSET(sc->sc_dev.dv_flags, DVF_ACTIVE) == 0)
|
||||
return (EIO);
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
|
||||
@ -1087,7 +1087,7 @@ scif_rxsoft(sc, tp)
|
||||
struct scif_softc *sc;
|
||||
struct tty *tp;
|
||||
{
|
||||
int (*rint) __P((int c, struct tty *tp)) = linesw[tp->t_line].l_rint;
|
||||
int (*rint) __P((int c, struct tty *tp)) = tp->t_linesw->l_rint;
|
||||
u_char *get, *end;
|
||||
u_int cc, scc;
|
||||
u_char ssr2;
|
||||
@ -1179,7 +1179,7 @@ scif_txsoft(sc, tp)
|
||||
CLR(tp->t_state, TS_FLUSH);
|
||||
else
|
||||
ndflush(&tp->t_outq, (int)(sc->sc_tba - tp->t_outq.c_cf));
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
}
|
||||
|
||||
integrate void
|
||||
@ -1202,14 +1202,14 @@ scif_stsoft(sc, tp)
|
||||
/*
|
||||
* Inform the tty layer that carrier detect changed.
|
||||
*/
|
||||
(void) (*linesw[tp->t_line].l_modem)(tp, ISSET(msr, MSR_DCD));
|
||||
(void) (*tp->t_linesw->l_modem)(tp, ISSET(msr, MSR_DCD));
|
||||
}
|
||||
|
||||
if (ISSET(delta, sc->sc_msr_cts)) {
|
||||
/* Block or unblock output according to flow control. */
|
||||
if (ISSET(msr, sc->sc_msr_cts)) {
|
||||
sc->sc_tx_stopped = 0;
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
} else {
|
||||
sc->sc_tx_stopped = 1;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kd.c,v 1.15 2000/10/12 21:26:28 christos Exp $ */
|
||||
/* $NetBSD: kd.c,v 1.16 2000/11/02 00:42:40 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -234,7 +234,7 @@ static int firstopen = 1;
|
||||
|
||||
splx(s);
|
||||
|
||||
return ((*linesw[tp->t_line].l_open)(dev, tp));
|
||||
return ((*tp->t_linesw->l_open)(dev, tp));
|
||||
}
|
||||
|
||||
int
|
||||
@ -254,7 +254,7 @@ kdclose(dev, flag, mode, p)
|
||||
if ((tp->t_state & TS_ISOPEN) == 0)
|
||||
return 0;
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
|
||||
if ((cc = kd->kd_in) != NULL)
|
||||
@ -275,7 +275,7 @@ kdread(dev, uio, flag)
|
||||
kd = &kd_softc; /* XXX */
|
||||
tp = kd->kd_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -290,7 +290,7 @@ kdwrite(dev, uio, flag)
|
||||
kd = &kd_softc; /* XXX */
|
||||
tp = kd->kd_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -308,7 +308,7 @@ kdioctl(dev, cmd, data, flag, p)
|
||||
kd = &kd_softc; /* XXX */
|
||||
tp = kd->kd_tty;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return error;
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
@ -398,7 +398,7 @@ kd_later(arg)
|
||||
|
||||
s = spltty();
|
||||
tp->t_state &= ~TS_BUSY;
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
@ -446,7 +446,7 @@ kd_cons_input(c)
|
||||
if ((tp->t_state & TS_ISOPEN) == 0)
|
||||
return;
|
||||
|
||||
(*linesw[tp->t_line].l_rint)(c, tp);
|
||||
(*tp->t_linesw->l_rint)(c, tp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kd.c,v 1.33 2000/05/21 14:36:16 eeh Exp $ */
|
||||
/* $NetBSD: kd.c,v 1.34 2000/11/02 00:42:40 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -180,7 +180,7 @@ static int firstopen = 1;
|
||||
|
||||
splx(s);
|
||||
|
||||
return ((*linesw[tp->t_line].l_open)(dev, tp));
|
||||
return ((*tp->t_linesw->l_open)(dev, tp));
|
||||
}
|
||||
|
||||
int
|
||||
@ -200,7 +200,7 @@ kdclose(dev, flag, mode, p)
|
||||
if ((tp->t_state & TS_ISOPEN) == 0)
|
||||
return 0;
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
if ((cc = kd->kd_in) != NULL)
|
||||
(void)(*cc->cc_iclose)(cc->cc_dev);
|
||||
@ -219,7 +219,7 @@ kdread(dev, uio, flag)
|
||||
kd = &kd_softc; /* XXX */
|
||||
tp = kd->kd_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -234,7 +234,7 @@ kdwrite(dev, uio, flag)
|
||||
kd = &kd_softc; /* XXX */
|
||||
tp = kd->kd_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -252,7 +252,7 @@ kdioctl(dev, cmd, data, flag, p)
|
||||
kd = &kd_softc; /* XXX */
|
||||
tp = kd->kd_tty;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return error;
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
@ -353,7 +353,7 @@ kd_later(tpaddr)
|
||||
|
||||
s = spltty();
|
||||
tp->t_state &= ~TS_BUSY;
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
@ -434,7 +434,7 @@ kd_cons_input(c)
|
||||
if ((tp->t_state & TS_ISOPEN) == 0)
|
||||
return;
|
||||
|
||||
(*linesw[tp->t_line].l_rint)(c, tp);
|
||||
(*tp->t_linesw->l_rint)(c, tp);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: qv.c,v 1.3 1999/01/01 21:43:18 ragge Exp $ */
|
||||
/* $NetBSD: qv.c,v 1.4 2000/11/02 00:42:41 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1988
|
||||
@ -409,7 +409,7 @@ qvopen(dev, flag)
|
||||
* mouse channel. For the mouse we init the ring ptr's.
|
||||
*/
|
||||
if( QVCHAN(unit) != QVMOUSECHAN )
|
||||
return ((*linesw[tp->t_line].l_open)(dev, tp));
|
||||
return ((*tp->t_linesw->l_open)(dev, tp));
|
||||
else {
|
||||
mouseon = 1;
|
||||
/* set up event queue for later */
|
||||
@ -450,7 +450,7 @@ qvclose(dev, flag, mode, p)
|
||||
* otherwise clear the state flag, and put the keyboard into down/up.
|
||||
*/
|
||||
if (QVCHAN(unit) != QVMOUSECHAN) {
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
error = ttyclose(tp);
|
||||
} else {
|
||||
mouseon = 0;
|
||||
@ -470,7 +470,7 @@ qvread(dev, uio)
|
||||
|
||||
if (QVCHAN(unit) != QVMOUSECHAN) {
|
||||
tp = &qv_tty[unit];
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio));
|
||||
}
|
||||
return (ENXIO);
|
||||
}
|
||||
@ -492,7 +492,7 @@ qvwrite(dev, uio)
|
||||
return 0;
|
||||
}
|
||||
tp = &qv_tty[unit];
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio));
|
||||
}
|
||||
|
||||
|
||||
@ -606,9 +606,9 @@ qvkint(qv)
|
||||
register char *string;
|
||||
string = q_special[ c & 0x7f ];
|
||||
while( *string )
|
||||
(*linesw[tp->t_line].l_rint)(*string++, tp);
|
||||
(*tp->t_linesw->l_rint)(*string++, tp);
|
||||
} else
|
||||
(*linesw[tp->t_line].l_rint)(c, tp);
|
||||
(*tp->t_linesw->l_rint)(c, tp);
|
||||
} else {
|
||||
/*
|
||||
* Mouse channel is open put it into the event queue
|
||||
@ -683,7 +683,7 @@ qvioctl(dev, cmd, data, flag)
|
||||
break;
|
||||
default: /* not ours ?? */
|
||||
tp = &qv_tty[unit];
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gencons.c,v 1.27 2000/07/26 15:16:55 ragge Exp $ */
|
||||
/* $NetBSD: gencons.c,v 1.28 2000/11/02 00:42:41 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Gordon W. Ross
|
||||
@ -107,7 +107,7 @@ gencnopen(dev_t dev, int flag, int mode, struct proc *p)
|
||||
mtpr(GC_RIE, pr_rxcs[unit]); /* Turn on interrupts */
|
||||
mtpr(GC_TIE, pr_txcs[unit]);
|
||||
|
||||
return ((*linesw[tp->t_line].l_open)(dev, tp));
|
||||
return ((*tp->t_linesw->l_open)(dev, tp));
|
||||
}
|
||||
|
||||
int
|
||||
@ -117,7 +117,7 @@ gencnclose(dev_t dev, int flag, int mode, struct proc *p)
|
||||
|
||||
if (minor(dev) == 0)
|
||||
consopened = 0;
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
return (0);
|
||||
}
|
||||
@ -133,7 +133,7 @@ gencnread(dev_t dev, struct uio *uio, int flag)
|
||||
{
|
||||
struct tty *tp = gencn_tty[minor(dev)];
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -141,7 +141,7 @@ gencnwrite(dev_t dev, struct uio *uio, int flag)
|
||||
{
|
||||
struct tty *tp = gencn_tty[minor(dev)];
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -150,7 +150,7 @@ gencnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||
struct tty *tp = gencn_tty[minor(dev)];
|
||||
int error;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return error;
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
@ -203,11 +203,11 @@ gencnrint(void *arg)
|
||||
return;
|
||||
|
||||
if (j == 2) /* Second char wasn't 'D' */
|
||||
(*linesw[tp->t_line].l_rint)(27, tp);
|
||||
(*tp->t_linesw->l_rint)(27, tp);
|
||||
}
|
||||
#endif
|
||||
|
||||
(*linesw[tp->t_line].l_rint)(i, tp);
|
||||
(*tp->t_linesw->l_rint)(i, tp);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: com.c,v 1.17 2000/03/23 06:47:32 thorpej Exp $ */
|
||||
/* $NetBSD: com.c,v 1.18 2000/11/02 00:42:41 eeh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -556,7 +556,7 @@ comopen(dev, flag, mode, p)
|
||||
error = ttyopen(tp, COMDIALOUT(dev), ISSET(flag, O_NONBLOCK));
|
||||
|
||||
if (!error)
|
||||
error = (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
error = (*tp->t_linesw->l_open)(dev, tp);
|
||||
|
||||
/* XXX cleanup on error */
|
||||
|
||||
@ -579,7 +579,7 @@ comclose(dev, flag, mode, p)
|
||||
if (!ISSET(tp->t_state, TS_ISOPEN))
|
||||
return 0;
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
s = spltty();
|
||||
CLR(sc->sc_lcr, LCR_SBREAK);
|
||||
outb(pio(iobase , com_lcr), sc->sc_lcr);
|
||||
@ -612,7 +612,7 @@ comread(dev, uio, flag)
|
||||
struct com_softc *sc = xcom_cd.cd_devs[COMUNIT(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -624,7 +624,7 @@ comwrite(dev, uio, flag)
|
||||
struct com_softc *sc = xcom_cd.cd_devs[COMUNIT(dev)];
|
||||
struct tty *tp = sc->sc_tty;
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -664,7 +664,7 @@ comioctl(dev, cmd, data, flag, p)
|
||||
int iobase = sc->sc_iobase;
|
||||
int error;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
return error;
|
||||
error = ttioctl(tp, cmd, data, flag, p);
|
||||
@ -865,7 +865,7 @@ comparam(tp, t)
|
||||
if (!ISSET(sc->sc_msr, MSR_DCD) &&
|
||||
!ISSET(sc->sc_swflags, COM_SW_SOFTCAR) &&
|
||||
ISSET(oldcflag, MDMBUF) != ISSET(tp->t_cflag, MDMBUF) &&
|
||||
(*linesw[tp->t_line].l_modem)(tp, 0) == 0) {
|
||||
(*tp->t_linesw->l_modem)(tp, 0) == 0) {
|
||||
CLR(sc->sc_mcr, sc->sc_dtr);
|
||||
outb(pio(iobase , com_mcr), sc->sc_mcr);
|
||||
}
|
||||
@ -1052,7 +1052,7 @@ compoll(arg)
|
||||
}
|
||||
/* This is ugly, but fast. */
|
||||
c |= lsrmap[(*ibufp++ & (LSR_BI|LSR_FE|LSR_PE)) >> 2];
|
||||
(*linesw[tp->t_line].l_rint)(c, tp);
|
||||
(*tp->t_linesw->l_rint)(c, tp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1128,14 +1128,14 @@ comintr(arg)
|
||||
sc->sc_msr = msr;
|
||||
if (ISSET(delta, MSR_DCD) &&
|
||||
!ISSET(sc->sc_swflags, COM_SW_SOFTCAR) &&
|
||||
(*linesw[tp->t_line].l_modem)(tp, ISSET(msr, MSR_DCD)) == 0) {
|
||||
(*tp->t_linesw->l_modem)(tp, ISSET(msr, MSR_DCD)) == 0) {
|
||||
CLR(sc->sc_mcr, sc->sc_dtr);
|
||||
outb(pio(iobase , com_mcr), sc->sc_mcr);
|
||||
}
|
||||
if (ISSET(delta & msr, MSR_CTS) &&
|
||||
ISSET(tp->t_cflag, CRTSCTS)) {
|
||||
/* the line is up and we want to do rts/cts flow control */
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1143,7 +1143,7 @@ comintr(arg)
|
||||
CLR(tp->t_state, TS_BUSY | TS_FLUSH);
|
||||
if (sc->sc_halt > 0)
|
||||
wakeup(&tp->t_outq);
|
||||
(*linesw[tp->t_line].l_start)(tp);
|
||||
(*tp->t_linesw->l_start)(tp);
|
||||
}
|
||||
|
||||
if ((iir = ISSET(inb(pio(iobase , com_iir)), IIR_NOPEND)))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ite.c,v 1.22 2000/05/25 03:30:19 itohy Exp $ */
|
||||
/* $NetBSD: ite.c,v 1.23 2000/11/02 00:42:41 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -405,7 +405,7 @@ iteopen(dev, mode, devtype, p)
|
||||
tp->t_state = TS_ISOPEN|TS_CARR_ON;
|
||||
ttsetwater(tp);
|
||||
}
|
||||
error = (*linesw[tp->t_line].l_open)(dev, tp);
|
||||
error = (*tp->t_linesw->l_open)(dev, tp);
|
||||
if (error == 0) {
|
||||
tp->t_winsize.ws_row = ip->rows;
|
||||
tp->t_winsize.ws_col = ip->cols;
|
||||
@ -423,7 +423,7 @@ iteclose(dev, flag, mode, p)
|
||||
{
|
||||
register struct tty *tp = ite_tty[UNIT(dev)];
|
||||
|
||||
(*linesw[tp->t_line].l_close)(tp, flag);
|
||||
(*tp->t_linesw->l_close)(tp, flag);
|
||||
ttyclose(tp);
|
||||
iteoff(dev, 0);
|
||||
#if 0
|
||||
@ -441,7 +441,7 @@ iteread(dev, uio, flag)
|
||||
{
|
||||
register struct tty *tp = ite_tty[UNIT(dev)];
|
||||
|
||||
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_read)(tp, uio, flag));
|
||||
}
|
||||
|
||||
int
|
||||
@ -452,7 +452,7 @@ itewrite(dev, uio, flag)
|
||||
{
|
||||
register struct tty *tp = ite_tty[UNIT(dev)];
|
||||
|
||||
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
|
||||
return ((*tp->t_linesw->l_write)(tp, uio, flag));
|
||||
}
|
||||
|
||||
struct tty *
|
||||
@ -475,7 +475,7 @@ iteioctl(dev, cmd, addr, flag, p)
|
||||
register struct tty *tp = ite_tty[UNIT(dev)];
|
||||
int error;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, addr, flag, p);
|
||||
error = (*tp->t_linesw->l_ioctl)(tp, cmd, addr, flag, p);
|
||||
if (error >= 0)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, addr, flag, p);
|
||||
|
Loading…
Reference in New Issue
Block a user