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/dev | |
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/dev')
-rw-r--r-- | sys/dev/cy/cy.c | 12 | ||||
-rw-r--r-- | sys/dev/cy/cy_isa.c | 12 | ||||
-rw-r--r-- | sys/dev/sio/sio.c | 11 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.c | 13 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.h | 4 |
5 files changed, 6 insertions, 46 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index ff67eb4..f9defd0 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.2 1995/02/15 18:41:41 bde Exp $ + * $Id: cy.c,v 1.3 1995/02/25 20:09:12 pst Exp $ */ /* @@ -1512,16 +1512,6 @@ cydevtotty(dev_t dev) } int -cyselect(dev_t dev, int rw, struct proc *p) -{ - u_char unit = UNIT(dev); - if (unit >= /* NCY * ? */ PORTS_PER_CYCLOM) - return (ENXIO); - - return (ttyselect(info[unit]->tty, rw, p)); -} - -int cyspeed(int speed, int *prescaler_io) { int actual; diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index ff67eb4..f9defd0 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cy.c,v 1.2 1995/02/15 18:41:41 bde Exp $ + * $Id: cy.c,v 1.3 1995/02/25 20:09:12 pst Exp $ */ /* @@ -1512,16 +1512,6 @@ cydevtotty(dev_t dev) } int -cyselect(dev_t dev, int rw, struct proc *p) -{ - u_char unit = UNIT(dev); - if (unit >= /* NCY * ? */ PORTS_PER_CYCLOM) - return (ENXIO); - - return (ttyselect(info[unit]->tty, rw, p)); -} - -int cyspeed(int speed, int *prescaler_io) { int actual; diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 1930bb9..e5115e8 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.67 1995/02/25 20:09:14 pst Exp $ + * $Id: sio.c,v 1.68 1995/02/26 02:30:18 bde Exp $ */ #include "sio.h" @@ -1840,15 +1840,6 @@ siodevtotty(dev) return (&sio_tty[unit]); } -int -sioselect(dev, rw, p) - dev_t dev; - int rw; - struct proc *p; -{ - return (ttyselect(siodevtotty(dev), rw, p)); -} - static void commctl(com, bits, how) struct com_s *com; diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 379776b..71906d6 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.104 1995/02/22 13:40:19 sos Exp $ + * $Id: syscons.c,v 1.105 1995/02/25 20:09:16 pst Exp $ */ #include "sc.h" @@ -299,17 +299,6 @@ struct tty return VIRTUAL_TTY(unit); } -int -scselect(dev_t dev, int rw, struct proc *p) -{ - struct tty *tp = scdevtotty(dev); - - if (tp == NULL) - return(ENXIO); - - return (ttyselect(tp, rw, p)); -} - static scr_stat *get_scr_stat(dev_t dev) { diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h index 60cf84e..7b94bf5 100644 --- a/sys/dev/syscons/syscons.h +++ b/sys/dev/syscons/syscons.h @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.h,v 1.1 1995/02/22 13:40:21 sos Exp $ + * $Id: syscons.h,v 1.2 1995/02/25 20:09:21 pst Exp $ */ /* @@ -175,7 +175,7 @@ void scintr(int unit); int pcmmap(dev_t dev, int offset, int nprot); static void scinit(void); static u_int scgetc(int noblock); -static struct tty *get_tty_ptr(dev_t dev); +struct tty *scdevtotty(dev_t dev); static scr_stat *get_scr_stat(dev_t dev); static scr_stat *alloc_scp(); static void init_scp(scr_stat *scp); |