summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-10 07:32:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-10 07:32:43 +0000
commit41bd5ccaa5417d8f417adc05e5225d5a96b4550a (patch)
treea2e0f4df806ce570835e9d06ef054d58af89d88c /sys/dev
parentd3cf5f8309a354424af056f57c400132fe210637 (diff)
tty_attach()
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/com.c9
-rw-r--r--sys/dev/isa/com.c9
-rw-r--r--sys/dev/isa/cy.c6
3 files changed, 14 insertions, 10 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index e5da21469df..eb37eb9cef6 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: com.c,v 1.15 1996/05/26 00:27:14 deraadt Exp $ */
-/* $NetBSD: com.c,v 1.82 1996/05/12 23:52:00 mycroft Exp $ */
+/* $OpenBSD: com.c,v 1.16 1996/06/10 07:32:39 deraadt Exp $ */
+/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996
@@ -757,9 +757,10 @@ comopen(dev, flag, mode, p)
if (!sc || ISSET(sc->sc_hwflags, COM_HW_ABSENT|COM_HW_ABSENT_PENDING))
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;
diff --git a/sys/dev/isa/com.c b/sys/dev/isa/com.c
index e5da21469df..eb37eb9cef6 100644
--- a/sys/dev/isa/com.c
+++ b/sys/dev/isa/com.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: com.c,v 1.15 1996/05/26 00:27:14 deraadt Exp $ */
-/* $NetBSD: com.c,v 1.82 1996/05/12 23:52:00 mycroft Exp $ */
+/* $OpenBSD: com.c,v 1.16 1996/06/10 07:32:39 deraadt Exp $ */
+/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996
@@ -757,9 +757,10 @@ comopen(dev, flag, mode, p)
if (!sc || ISSET(sc->sc_hwflags, COM_HW_ABSENT|COM_HW_ABSENT_PENDING))
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;
diff --git a/sys/dev/isa/cy.c b/sys/dev/isa/cy.c
index c99765308e7..03e1cf74756 100644
--- a/sys/dev/isa/cy.c
+++ b/sys/dev/isa/cy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cy.c,v 1.12 1995/06/28 04:31:32 cgd Exp $ */
+/* $NetBSD: cy.c,v 1.12.6.1 1996/06/02 09:08:03 mrg 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;