diff options
author | phk <phk@FreeBSD.org> | 1999-09-25 16:21:39 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-09-25 16:21:39 +0000 |
commit | a2c68c62dba7acc1de5dd6a6141484d9c12844fe (patch) | |
tree | c55829a482e5222c5ae63cf589d4fd2a7ec13aec /sys/kern/tty_cons.c | |
parent | 869afb6bbe2f0a063d91bf2099b7121d2d03c1b2 (diff) | |
download | FreeBSD-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/kern/tty_cons.c')
-rw-r--r-- | sys/kern/tty_cons.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index 4fef6f6..c59864f 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -100,7 +100,6 @@ static u_char cn_phys_is_open; /* nonzero if physical device is open */ static d_close_t *cn_phys_close; /* physical device close function */ static d_open_t *cn_phys_open; /* physical device open function */ struct consdev *cn_tab; /* physical console device info */ -static struct tty *cn_tp; /* physical console tty struct */ static dev_t condev_t; /* represents the device private info */ CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL, NULL); @@ -175,7 +174,6 @@ cninit_finish() cdp->d_close = cnclose; cn_phys_open = cdp->d_open; cdp->d_open = cnopen; - cn_tp = (*cdp->d_devtotty)(cn_tab->cn_dev); cn_dev_t = cn_tab->cn_dev; cn_udev_t = dev2udev(cn_dev_t); } @@ -196,7 +194,6 @@ cnuninit(void) cn_phys_close = NULL; cdp->d_open = cn_phys_open; cn_phys_open = NULL; - cn_tp = NULL; cn_dev_t = NODEV; cn_udev_t = NOUDEV; } @@ -281,6 +278,7 @@ cnopen(dev, flag, mode, p) openflag = flag; cn_is_open = 1; } + dev->si_tty = physdev->si_tty; } return (retval); } @@ -292,10 +290,12 @@ cnclose(dev, flag, mode, p) struct proc *p; { dev_t cndev; + struct tty *cn_tp; if (cn_tab == NULL) return (0); cndev = cn_tab->cn_dev; + cn_tp = cndev->si_tty; /* * act appropriatly depending on whether it's /dev/console * or the pysical device (e.g. /dev/sio) that's being closed. |