Deleted Added
sdiff udiff text old ( 111742 ) new ( 111815 )
full compact
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 111815 2003-03-03 12:15:54Z 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>

--- 29 unchanged lines hidden (view full) ---

72static d_open_t ptcopen;
73static d_close_t ptcclose;
74static d_read_t ptcread;
75static d_write_t ptcwrite;
76static d_poll_t ptcpoll;
77
78#define CDEV_MAJOR_S 5
79static struct cdevsw pts_cdevsw = {
80 .d_open = ptsopen,
81 .d_close = ptsclose,
82 .d_read = ptsread,
83 .d_write = ptswrite,
84 .d_ioctl = ptyioctl,
85 .d_poll = ttypoll,
86 .d_name = "pts",
87 .d_maj = CDEV_MAJOR_S,
88 .d_flags = D_TTY | D_KQFILTER,
89 .d_kqfilter = ttykqfilter,
90};
91
92#define CDEV_MAJOR_C 6
93static struct cdevsw ptc_cdevsw = {
94 .d_open = ptcopen,
95 .d_close = ptcclose,
96 .d_read = ptcread,
97 .d_write = ptcwrite,
98 .d_ioctl = ptyioctl,
99 .d_poll = ptcpoll,
100 .d_name = "ptc",
101 .d_maj = CDEV_MAJOR_C,
102 .d_flags = D_TTY | D_KQFILTER,
103 .d_kqfilter = ttykqfilter,
104};
105
106#define BUFSIZ 100 /* Chunk size iomoved to/from user */
107
108struct pt_ioctl {
109 int pt_flags;
110 struct selinfo pt_selr, pt_selw;
111 u_char pt_send;

--- 753 unchanged lines hidden ---