summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/cx.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-09-25 16:21:39 +0000
committerphk <phk@FreeBSD.org>1999-09-25 16:21:39 +0000
commita2c68c62dba7acc1de5dd6a6141484d9c12844fe (patch)
treec55829a482e5222c5ae63cf589d4fd2a7ec13aec /sys/i386/isa/cx.c
parent869afb6bbe2f0a063d91bf2099b7121d2d03c1b2 (diff)
downloadFreeBSD-src-a2c68c62dba7acc1de5dd6a6141484d9c12844fe.zip
FreeBSD-src-a2c68c62dba7acc1de5dd6a6141484d9c12844fe.tar.gz
This patch clears the way for removing a number of tty related
fields in struct cdevsw: d_stop moved to struct tty. d_reset already unused. d_devtotty linkage now provided by dev_t->si_tty. These fields will be removed from struct cdevsw together with d_params and d_maxio Real Soon Now. The changes in this patch consist of: initialize dev->si_tty in *_open() initialize tty->t_stop remove devtotty functions rename ttpoll to ttypoll a few adjustments to these changes in the generic code a bump of __FreeBSD_version add a couple of FreeBSD tags
Diffstat (limited to 'sys/i386/isa/cx.c')
-rw-r--r--sys/i386/isa/cx.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c
index da7f2e8..0f5f408 100644
--- a/sys/i386/isa/cx.c
+++ b/sys/i386/isa/cx.c
@@ -14,6 +14,9 @@
* all derivative works or modified versions.
*
* Version 1.9, Wed Oct 4 18:58:15 MSK 1995
+ *
+ * $FreeBSD$
+ *
*/
#undef DEBUG
@@ -85,8 +88,6 @@ static d_close_t cxclose;
static d_read_t cxread;
static d_write_t cxwrite;
static d_ioctl_t cxioctl;
-static d_stop_t cxstop;
-static d_devtotty_t cxdevtotty;
#define CDEV_MAJOR 42
/* Don't make this static, since if_cx.c uses it. */
@@ -96,10 +97,10 @@ struct cdevsw cx_cdevsw = {
/* read */ cxread,
/* write */ cxwrite,
/* ioctl */ cxioctl,
- /* stop */ cxstop,
+ /* stop */ nostop,
/* reset */ noreset,
- /* devtotty */ cxdevtotty,
- /* poll */ ttpoll,
+ /* devtotty */ nodevtotty,
+ /* poll */ ttypoll,
/* mmap */ nommap,
/* strategy */ nostrategy,
/* name */ "cx",
@@ -116,6 +117,7 @@ struct tty *cx_tty [NCX*NCHAN]; /* tty data */
#endif
static void cxoproc (struct tty *tp);
+static void cxstop (struct tty *tp, int flag);
static int cxparam (struct tty *tp, struct termios *t);
int cxopen (dev_t dev, int flag, int mode, struct proc *p)
@@ -149,8 +151,10 @@ int cxopen (dev_t dev, int flag, int mode, struct proc *p)
c->ttyp = cx_tty[unit];
#endif
c->ttyp->t_oproc = cxoproc;
+ c->ttyp->t_stop = cxstop;
c->ttyp->t_param = cxparam;
}
+ dev->si_tty = c->ttyp;
#ifdef __bsdi__
if (! c->ttydev) {
MALLOC (c->ttydev, struct ttydevice_tmp*,
@@ -743,15 +747,6 @@ cxparam (struct tty *tp, struct termios *t)
return (0);
}
-struct tty *cxdevtotty (dev_t dev)
-{
- int unit = UNIT(dev);
-
- if (unit == UNIT_CTL || unit >= NCX*NCHAN)
- return (0);
- return (cxchan[unit]->ttyp);
-}
-
/*
* Stop output on a line
*/
OpenPOWER on IntegriCloud