summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-08-08 20:24:58 +0000
committerphk <phk@FreeBSD.org>1999-08-08 20:24:58 +0000
commit133bb37bf5edbb137a7db3d4ac2b32dced8dac3b (patch)
treeb439e18481fa22204516b782742bfe5c6da82f3d /sys/kern/tty.c
parent23e2feba7f7724a258d17f51f5b596136a4c47ff (diff)
downloadFreeBSD-src-133bb37bf5edbb137a7db3d4ac2b32dced8dac3b.zip
FreeBSD-src-133bb37bf5edbb137a7db3d4ac2b32dced8dac3b.tar.gz
Enable ttymalloc().
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 46c15c6..fca46ba 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.119 1999/05/22 20:10:31 dt Exp $
+ * $Id: tty.c,v 1.120 1999/08/08 19:47:31 phk Exp $
*/
/*-
@@ -2407,25 +2407,22 @@ ttysleep(tp, chan, pri, wmesg, timo)
return (tp->t_gen == gen ? 0 : ERESTART);
}
-#ifdef notyet
-/*
- * XXX this is usable not useful or used. Most tty drivers have
- * ifdefs for using ttymalloc() but assume a different interface.
- */
/*
* Allocate a tty struct. Clists in the struct will be allocated by
* ttyopen().
*/
struct tty *
-ttymalloc()
+ttymalloc(tp)
+ struct tty *tp;
{
- struct tty *tp;
+ if (tp)
+ return(tp);
tp = malloc(sizeof *tp, M_TTYS, M_WAITOK);
bzero(tp, sizeof *tp);
+ ttyregister(tp);
return (tp);
}
-#endif
#if 0 /* XXX not yet usable: session leader holds a ref (see kern_exit.c). */
/*
OpenPOWER on IntegriCloud