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_snoop.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_snoop.c')
-rw-r--r-- | sys/kern/tty_snoop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c index 7563686..e30b293 100644 --- a/sys/kern/tty_snoop.c +++ b/sys/kern/tty_snoop.c @@ -82,9 +82,9 @@ snpdevtotty (dev) struct cdevsw *cdp; cdp = devsw(dev); - if (cdp == NULL) - return (NULL); - return ((*cdp->d_devtotty)(dev)); + if (cdp && cdp->d_flags & D_TTY) + return (dev->si_tty); + return (NULL); } #define SNP_INPUT_BUF 5 /* This is even too much,the maximal |