Deleted Added
full compact
pty.c (69781) pty.c (72521)
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 69781 2000-12-08 21:51:06Z dwmalone $
34 * $FreeBSD: head/sys/kern/tty_pty.c 72521 2001-02-15 16:34:11Z jlemon $
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>

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

81 /* ioctl */ ptyioctl,
82 /* poll */ ttypoll,
83 /* mmap */ nommap,
84 /* strategy */ nostrategy,
85 /* name */ "pts",
86 /* maj */ CDEV_MAJOR_S,
87 /* dump */ nodump,
88 /* psize */ nopsize,
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>

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

81 /* ioctl */ ptyioctl,
82 /* poll */ ttypoll,
83 /* mmap */ nommap,
84 /* strategy */ nostrategy,
85 /* name */ "pts",
86 /* maj */ CDEV_MAJOR_S,
87 /* dump */ nodump,
88 /* psize */ nopsize,
89 /* flags */ D_TTY,
90 /* bmaj */ -1
89 /* flags */ D_TTY | D_KQFILTER,
90 /* bmaj */ -1,
91 /* kqfilter */ ttykqfilter,
91};
92
93#define CDEV_MAJOR_C 6
94static struct cdevsw ptc_cdevsw = {
95 /* open */ ptcopen,
96 /* close */ ptcclose,
97 /* read */ ptcread,
98 /* write */ ptcwrite,
99 /* ioctl */ ptyioctl,
100 /* poll */ ptcpoll,
101 /* mmap */ nommap,
102 /* strategy */ nostrategy,
103 /* name */ "ptc",
104 /* maj */ CDEV_MAJOR_C,
105 /* dump */ nodump,
106 /* psize */ nopsize,
92};
93
94#define CDEV_MAJOR_C 6
95static struct cdevsw ptc_cdevsw = {
96 /* open */ ptcopen,
97 /* close */ ptcclose,
98 /* read */ ptcread,
99 /* write */ ptcwrite,
100 /* ioctl */ ptyioctl,
101 /* poll */ ptcpoll,
102 /* mmap */ nommap,
103 /* strategy */ nostrategy,
104 /* name */ "ptc",
105 /* maj */ CDEV_MAJOR_C,
106 /* dump */ nodump,
107 /* psize */ nopsize,
107 /* flags */ D_TTY,
108 /* bmaj */ -1
108 /* flags */ D_TTY | D_KQFILTER,
109 /* bmaj */ -1,
110 /* kqfilter */ ttykqfilter,
109};
110
111#define BUFSIZ 100 /* Chunk size iomoved to/from user */
112
113struct pt_ioctl {
114 int pt_flags;
115 struct selinfo pt_selr, pt_selw;
116 u_char pt_send;

--- 736 unchanged lines hidden ---
111};
112
113#define BUFSIZ 100 /* Chunk size iomoved to/from user */
114
115struct pt_ioctl {
116 int pt_flags;
117 struct selinfo pt_selr, pt_selw;
118 u_char pt_send;

--- 736 unchanged lines hidden ---