add tty_attach() where appropriate.

This commit is contained in:
cgd 1996-05-30 18:24:09 +00:00
parent e81bea0de0
commit 08d585e924
3 changed files with 12 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: com.c,v 1.82 1996/05/12 23:52:00 mycroft Exp $ */
/* $NetBSD: com.c,v 1.83 1996/05/30 18:24:09 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996
@ -528,9 +528,10 @@ comopen(dev, flag, mode, p)
if (!sc)
return ENXIO;
if (!sc->sc_tty)
if (!sc->sc_tty) {
tp = sc->sc_tty = ttymalloc();
else
tty_attach(tp);
} else
tp = sc->sc_tty;
tp->t_oproc = comstart;

View File

@ -1,4 +1,4 @@
/* $NetBSD: com.c,v 1.82 1996/05/12 23:52:00 mycroft Exp $ */
/* $NetBSD: com.c,v 1.83 1996/05/30 18:24:09 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996
@ -528,9 +528,10 @@ comopen(dev, flag, mode, p)
if (!sc)
return ENXIO;
if (!sc->sc_tty)
if (!sc->sc_tty) {
tp = sc->sc_tty = ttymalloc();
else
tty_attach(tp);
} else
tp = sc->sc_tty;
tp->t_oproc = comstart;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cy.c,v 1.12 1995/06/28 04:31:32 cgd Exp $ */
/* $NetBSD: cy.c,v 1.13 1996/05/30 18:24:16 cgd Exp $ */
/* XXX THIS DRIVER IS BROKEN. IT WILL NOT EVEN COMPILE. */
@ -337,8 +337,10 @@ cyopen(dev_t dev, int flag, int mode, struct proc *p)
infop = info[unit];
base = infop->base_addr;
if (!cy_tty[unit])
if (!cy_tty[unit]) {
infop->tty = cy_tty[unit] = ttymalloc();
tty_attach(infop->tty);
}
tp = infop->tty;
tp->t_oproc = cystart;