diff options
author | pst <pst@FreeBSD.org> | 1995-02-28 00:21:11 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1995-02-28 00:21:11 +0000 |
commit | 9b98fb36dc05ba21e4898c983c58bc0eb8f669b4 (patch) | |
tree | 91c6a33544eb4628383ab7c05b8571d00b6f35d3 /sys/kern | |
parent | 2b514bef5110bbe670f032770ac8769b1f371b4c (diff) | |
download | FreeBSD-src-9b98fb36dc05ba21e4898c983c58bc0eb8f669b4.zip FreeBSD-src-9b98fb36dc05ba21e4898c983c58bc0eb8f669b4.tar.gz |
Incorporate bde's code-review comments.
(a) bring back ttselect, now that we have xxxdevtotty() it isn't dangerous.
(b) remove all of the wrappers that have been replaced by ttselect
(c) fix formatting in syscons.c and definition in syscons.h
(d) add cxdevtotty
NOT DONE:
(e) make pcvt work... it was already broken...when someone fixes pcvt to
link properly, just rename get_pccons to xxxdevtotty and we're done
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty.c | 15 | ||||
-rw-r--r-- | sys/kern/tty_pty.c | 12 |
2 files changed, 15 insertions, 12 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index e516ec2..2020d7d 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $Id: tty.c,v 1.32 1995/02/25 20:09:29 pst Exp $ + * $Id: tty.c,v 1.33 1995/02/27 19:47:31 ugen Exp $ */ #include "snp.h" @@ -988,6 +988,19 @@ win: splx(s); } /* + * This is a wrapper for compatibility with the select vector used by + * cdevsw. It relies on a proper xxxdevtotty routine. + */ +int +ttselect(dev, rw, p) + dev_t dev; + int rw; + struct proc *p; +{ + return ttyselect((*cdevsw[major(dev)].d_devtotty)(dev), rw, p); +} + +/* * This is now exported to the cy driver as well; if you hack this code, * then be sure to keep /sys/i386/isa/cy.c properly advised! -jkh */ diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 14ef309..861982e 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tty_pty.c 8.2 (Berkeley) 9/23/93 - * $Id: tty_pty.c,v 1.6 1994/10/29 23:59:48 ache Exp $ + * $Id: tty_pty.c,v 1.7 1995/02/25 20:09:30 pst Exp $ */ /* @@ -562,16 +562,6 @@ ptydevtotty(dev) return &pt_tty[minor(dev)]; } -int -ptsselect(dev, rw, p) - dev_t dev; - int rw; - struct proc * p; -{ - return ttyselect(ptydevtotty(dev), rw, p); -} - - /*ARGSUSED*/ int ptyioctl(dev, cmd, data, flag, p) |