Deleted Added
full compact
kern_descrip.c (111708) kern_descrip.c (111815)
1/*
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
1/*
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
39 * $FreeBSD: head/sys/kern/kern_descrip.c 111708 2003-03-01 17:18:28Z tegge $
39 * $FreeBSD: head/sys/kern/kern_descrip.c 111815 2003-03-03 12:15:54Z phk $
40 */
41
42#include "opt_compat.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/syscallsubr.h>
47#include <sys/sysproto.h>

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

78
79uma_zone_t file_zone;
80
81static d_open_t fdopen;
82#define NUMFDESC 64
83
84#define CDEV_MAJOR 22
85static struct cdevsw fildesc_cdevsw = {
40 */
41
42#include "opt_compat.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/syscallsubr.h>
47#include <sys/sysproto.h>

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

78
79uma_zone_t file_zone;
80
81static d_open_t fdopen;
82#define NUMFDESC 64
83
84#define CDEV_MAJOR 22
85static struct cdevsw fildesc_cdevsw = {
86 /* open */ fdopen,
87 /* close */ noclose,
88 /* read */ noread,
89 /* write */ nowrite,
90 /* ioctl */ noioctl,
91 /* poll */ nopoll,
92 /* mmap */ nommap,
93 /* strategy */ nostrategy,
94 /* name */ "FD",
95 /* maj */ CDEV_MAJOR,
96 /* dump */ nodump,
97 /* psize */ nopsize,
98 /* flags */ 0,
86 .d_open = fdopen,
87 .d_name = "FD",
88 .d_maj = CDEV_MAJOR,
99};
100
101/* How to treat 'new' parameter when allocating a fd for do_dup(). */
102enum dup_type { DUP_VARIABLE, DUP_FIXED };
103
104static int do_dup(struct thread *td, enum dup_type type, int old, int new,
105 register_t *retval);
106

--- 2176 unchanged lines hidden ---
89};
90
91/* How to treat 'new' parameter when allocating a fd for do_dup(). */
92enum dup_type { DUP_VARIABLE, DUP_FIXED };
93
94static int do_dup(struct thread *td, enum dup_type type, int old, int new,
95 register_t *retval);
96

--- 2176 unchanged lines hidden ---