Deleted Added
full compact
pty.c (111742) pty.c (111815)
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 111742 2003-03-02 15:56:49Z des $
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 = {
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 /* open */ ptsopen,
81 /* close */ ptsclose,
82 /* read */ ptsread,
83 /* write */ ptswrite,
84 /* ioctl */ ptyioctl,
85 /* poll */ ttypoll,
86 /* mmap */ nommap,
87 /* strategy */ nostrategy,
88 /* name */ "pts",
89 /* maj */ CDEV_MAJOR_S,
90 /* dump */ nodump,
91 /* psize */ nopsize,
92 /* flags */ D_TTY | D_KQFILTER,
93 /* kqfilter */ ttykqfilter,
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,
94};
95
96#define CDEV_MAJOR_C 6
97static struct cdevsw ptc_cdevsw = {
90};
91
92#define CDEV_MAJOR_C 6
93static struct cdevsw ptc_cdevsw = {
98 /* open */ ptcopen,
99 /* close */ ptcclose,
100 /* read */ ptcread,
101 /* write */ ptcwrite,
102 /* ioctl */ ptyioctl,
103 /* poll */ ptcpoll,
104 /* mmap */ nommap,
105 /* strategy */ nostrategy,
106 /* name */ "ptc",
107 /* maj */ CDEV_MAJOR_C,
108 /* dump */ nodump,
109 /* psize */ nopsize,
110 /* flags */ D_TTY | D_KQFILTER,
111 /* kqfilter */ ttykqfilter,
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,
112};
113
114#define BUFSIZ 100 /* Chunk size iomoved to/from user */
115
116struct pt_ioctl {
117 int pt_flags;
118 struct selinfo pt_selr, pt_selw;
119 u_char pt_send;

--- 753 unchanged lines hidden ---
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 ---