pty.c (77176) | pty.c (77360) |
---|---|
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 * $FreeBSD: head/sys/kern/tty_pty.c 77176 2001-05-25 13:23:42Z phk $ | 34 * $FreeBSD: head/sys/kern/tty_pty.c 77360 2001-05-28 20:22:12Z phk $ |
35 */ 36 37/* 38 * Pseudo-teletype Driver 39 * (Actually two drivers, requiring two entries in 'cdevsw') 40 */ 41#include "opt_compat.h" 42#include <sys/param.h> --- 108 unchanged lines hidden (view full) --- 151 152 pt = malloc(sizeof(*pt), M_PTY, M_WAITOK | M_ZERO); 153 pt->devs = devs = make_dev(&pts_cdevsw, n, 154 UID_ROOT, GID_WHEEL, 0666, "tty%c%r", names[n / 32], n % 32); 155 pt->devc = devc; 156 157 devs->si_drv1 = devc->si_drv1 = pt; 158 devs->si_tty = devc->si_tty = &pt->pt_tty; | 35 */ 36 37/* 38 * Pseudo-teletype Driver 39 * (Actually two drivers, requiring two entries in 'cdevsw') 40 */ 41#include "opt_compat.h" 42#include <sys/param.h> --- 108 unchanged lines hidden (view full) --- 151 152 pt = malloc(sizeof(*pt), M_PTY, M_WAITOK | M_ZERO); 153 pt->devs = devs = make_dev(&pts_cdevsw, n, 154 UID_ROOT, GID_WHEEL, 0666, "tty%c%r", names[n / 32], n % 32); 155 pt->devc = devc; 156 157 devs->si_drv1 = devc->si_drv1 = pt; 158 devs->si_tty = devc->si_tty = &pt->pt_tty; |
159 pt->pt_tty.t_dev = devs; |
|
159 ttyregister(&pt->pt_tty); 160 return (devc); 161} 162 163/*ARGSUSED*/ 164static int 165ptsopen(dev, flag, devtype, p) 166 dev_t dev; --- 687 unchanged lines hidden --- | 160 ttyregister(&pt->pt_tty); 161 return (devc); 162} 163 164/*ARGSUSED*/ 165static int 166ptsopen(dev, flag, devtype, p) 167 dev_t dev; --- 687 unchanged lines hidden --- |