Deleted Added
full compact
kern_descrip.c (285390) kern_descrip.c (285391)
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.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
35 */
36
37#include <sys/cdefs.h>
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.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/kern_descrip.c 285390 2015-07-11 16:19:11Z mjg $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_descrip.c 285391 2015-07-11 16:22:48Z mjg $");
39
40#include "opt_capsicum.h"
41#include "opt_compat.h"
42#include "opt_ddb.h"
43#include "opt_ktrace.h"
44
45#include <sys/param.h>
46#include <sys/systm.h>

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

63#include <sys/priv.h>
64#include <sys/proc.h>
65#include <sys/protosw.h>
66#include <sys/racct.h>
67#include <sys/resourcevar.h>
68#include <sys/sbuf.h>
69#include <sys/signalvar.h>
70#include <sys/socketvar.h>
39
40#include "opt_capsicum.h"
41#include "opt_compat.h"
42#include "opt_ddb.h"
43#include "opt_ktrace.h"
44
45#include <sys/param.h>
46#include <sys/systm.h>

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

63#include <sys/priv.h>
64#include <sys/proc.h>
65#include <sys/protosw.h>
66#include <sys/racct.h>
67#include <sys/resourcevar.h>
68#include <sys/sbuf.h>
69#include <sys/signalvar.h>
70#include <sys/socketvar.h>
71#include <sys/kdb.h>
71#include <sys/stat.h>
72#include <sys/sx.h>
73#include <sys/syscallsubr.h>
74#include <sys/sysctl.h>
75#include <sys/sysproto.h>
76#include <sys/unistd.h>
77#include <sys/user.h>
78#include <sys/vnode.h>

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

303 fdefree_last(fde);
304 fde->fde_file = NULL;
305 fdunused(fdp, fd);
306#ifdef CAPABILITIES
307 seq_write_end(&fde->fde_seq);
308#endif
309}
310
72#include <sys/stat.h>
73#include <sys/sx.h>
74#include <sys/syscallsubr.h>
75#include <sys/sysctl.h>
76#include <sys/sysproto.h>
77#include <sys/unistd.h>
78#include <sys/user.h>
79#include <sys/vnode.h>

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

304 fdefree_last(fde);
305 fde->fde_file = NULL;
306 fdunused(fdp, fd);
307#ifdef CAPABILITIES
308 seq_write_end(&fde->fde_seq);
309#endif
310}
311
312void
313pwd_ensure_dirs(void)
314{
315 struct filedesc *fdp;
316
317 fdp = curproc->p_fd;
318 FILEDESC_XLOCK(fdp);
319 if (fdp->fd_cdir == NULL) {
320 fdp->fd_cdir = rootvnode;
321 VREF(rootvnode);
322 }
323 if (fdp->fd_rdir == NULL) {
324 fdp->fd_rdir = rootvnode;
325 VREF(rootvnode);
326 }
327 FILEDESC_XUNLOCK(fdp);
328}
329
311/*
312 * System calls on descriptors.
313 */
314#ifndef _SYS_SYSPROTO_H_
315struct getdtablesize_args {
316 int dummy;
317};
318#endif

--- 3633 unchanged lines hidden ---
330/*
331 * System calls on descriptors.
332 */
333#ifndef _SYS_SYSPROTO_H_
334struct getdtablesize_args {
335 int dummy;
336};
337#endif

--- 3633 unchanged lines hidden ---