pty.c (49536) | pty.c (49540) |
---|---|
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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 | 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 |
34 * $Id: tty_pty.c,v 1.61 1999/05/31 11:27:38 phk Exp $ | 34 * $Id: tty_pty.c,v 1.62 1999/08/08 19:28:50 phk Exp $ |
35 */ 36 37/* 38 * Pseudo-teletype Driver 39 * (Actually two drivers, requiring two entries in 'cdevsw') 40 */ 41#include "pty.h" /* XXX */ 42#include "opt_compat.h" --- 119 unchanged lines hidden (view full) --- 162 0, 0, 0666, "tty%c%r", names[n / 32], n % 32); 163 devc = make_dev(&ptc_cdevsw, n, 164 0, 0, 0666, "pty%c%r", names[n / 32], n % 32); 165 166 pt = malloc(sizeof(*pt), M_PTY, M_WAITOK); 167 bzero(pt, sizeof(*pt)); 168 devs->si_drv1 = devc->si_drv1 = pt; 169 devs->si_tty_tty = devc->si_tty_tty = &pt->pt_tty; | 35 */ 36 37/* 38 * Pseudo-teletype Driver 39 * (Actually two drivers, requiring two entries in 'cdevsw') 40 */ 41#include "pty.h" /* XXX */ 42#include "opt_compat.h" --- 119 unchanged lines hidden (view full) --- 162 0, 0, 0666, "tty%c%r", names[n / 32], n % 32); 163 devc = make_dev(&ptc_cdevsw, n, 164 0, 0, 0666, "pty%c%r", names[n / 32], n % 32); 165 166 pt = malloc(sizeof(*pt), M_PTY, M_WAITOK); 167 bzero(pt, sizeof(*pt)); 168 devs->si_drv1 = devc->si_drv1 = pt; 169 devs->si_tty_tty = devc->si_tty_tty = &pt->pt_tty; |
170 ttyregister(&pt->pt_tty); |
|
170} 171 172/*ARGSUSED*/ 173static int 174ptsopen(dev, flag, devtype, p) 175 dev_t dev; 176 int flag, devtype; 177 struct proc *p; --- 654 unchanged lines hidden --- | 171} 172 173/*ARGSUSED*/ 174static int 175ptsopen(dev, flag, devtype, p) 176 dev_t dev; 177 int flag, devtype; 178 struct proc *p; --- 654 unchanged lines hidden --- |