From 6e6fc14f32cd59e85d3f45f829c54ccf7919209f Mon Sep 17 00:00:00 2001 From: cgd Date: Thu, 30 May 1996 18:44:30 +0000 Subject: [PATCH] add tty_attach() calls where appropriate --- sys/arch/alpha/alpha/promcons.c | 7 ++++--- sys/arch/alpha/tc/scc.c | 7 +++++-- sys/arch/alpha/wscons/wscons.c | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/sys/arch/alpha/alpha/promcons.c b/sys/arch/alpha/alpha/promcons.c index 7a0a2ecf3d3e..6366e5db1a02 100644 --- a/sys/arch/alpha/alpha/promcons.c +++ b/sys/arch/alpha/alpha/promcons.c @@ -1,4 +1,4 @@ -/* $NetBSD: promcons.c,v 1.2 1995/06/28 02:45:19 cgd Exp $ */ +/* $NetBSD: promcons.c,v 1.3 1996/05/30 18:44:30 cgd Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -64,9 +64,10 @@ promopen(dev, flag, mode, p) s = spltty(); - if (!prom_tty[unit]) + if (!prom_tty[unit]) { tp = prom_tty[unit] = ttymalloc(); - else + tty_attach(tp); + } else tp = prom_tty[unit]; tp->t_oproc = promstart; diff --git a/sys/arch/alpha/tc/scc.c b/sys/arch/alpha/tc/scc.c index cb4e721bf560..d6bef061a1da 100644 --- a/sys/arch/alpha/tc/scc.c +++ b/sys/arch/alpha/tc/scc.c @@ -1,4 +1,4 @@ -/* $NetBSD: scc.c,v 1.16 1996/04/29 14:48:25 cgd Exp $ */ +/* $NetBSD: scc.c,v 1.17 1996/05/30 18:44:40 cgd Exp $ */ /* * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University @@ -305,6 +305,7 @@ sccattach(parent, self, aux) for (cntr = 0; cntr < 2; cntr++) { pdp->p_addr = (void *)sccaddr; tp = scc_tty[sc->sc_dv.dv_unit * 2 + cntr] = ttymalloc(); + tty_attach(tp); pdp->p_arg = (long)tp; pdp->p_fcn = (void (*)())0; tp->t_dev = (dev_t)((sc->sc_dv.dv_unit << 1) | cntr); @@ -473,8 +474,10 @@ sccopen(dev, flag, mode, p) if (sc->scc_pdma[line].p_addr == NULL) return (ENXIO); tp = scc_tty[minor(dev)]; - if (tp == NULL) + if (tp == NULL) { tp = scc_tty[minor(dev)] = ttymalloc(); + tty_attach(tp); + } tp->t_oproc = sccstart; tp->t_param = sccparam; tp->t_dev = dev; diff --git a/sys/arch/alpha/wscons/wscons.c b/sys/arch/alpha/wscons/wscons.c index 5f9a1d3b0762..49274d3aacdb 100644 --- a/sys/arch/alpha/wscons/wscons.c +++ b/sys/arch/alpha/wscons/wscons.c @@ -1,4 +1,4 @@ -/* $NetBSD: wscons.c,v 1.3 1996/04/17 21:48:30 cgd Exp $ */ +/* $NetBSD: wscons.c,v 1.4 1996/05/30 18:44:51 cgd Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -175,6 +175,7 @@ wsconsattach(parent, self, aux) * Set up the device's tty structure. */ sc->sc_tty = ttymalloc(); + tty_attach(sc->sc_tty); /* * Record other relevant information: ioctl and mmap functions.