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 111742 2003-03-02 15:56:49Z des $
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,
94};
95
96#define CDEV_MAJOR_C 6
97static 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,
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 ---