1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/kern/tty_pty.c 154015 2006-01-04 09:09:46Z phk $"); |
34 35/* 36 * Pseudo-teletype Driver 37 * (Actually two drivers, requiring two entries in 'cdevsw') 38 */ 39#include "opt_compat.h" 40#include "opt_tty.h" 41#include <sys/param.h> --- 103 unchanged lines hidden (view full) --- 145 146 devc->si_flags &= ~SI_CHEAPCLONE; 147 148 pt = malloc(sizeof(*pt), M_PTY, M_WAITOK | M_ZERO); 149 pt->devs = devs = make_dev_cred(&pts_cdevsw, n, td->td_ucred, 150 UID_ROOT, GID_WHEEL, 0666, "tty%c%r", names[n / 32], n % 32); 151 pt->devc = devc; 152 |
153 pt->pt_tty = ttyalloc(); |
154 pt->pt_tty->t_sc = pt; 155 devs->si_drv1 = devc->si_drv1 = pt; 156 devs->si_tty = devc->si_tty = pt->pt_tty; 157 pt->pt_tty->t_dev = devs; 158 return (devc); 159} 160 161/*ARGSUSED*/ --- 565 unchanged lines hidden --- |