Eliminated nested include of <sys/unistd.h> in <sys/file.h> in the kernel.

Include it directly in the few places where it is used.

Reduced some #includes of <sys/file.h> to #includes of <sys/fcntl.h> or
nothing.
This commit is contained in:
Bruce Evans 1996-09-03 14:25:27 +00:00
parent 4e4e09596d
commit b71fec07db
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18020
22 changed files with 53 additions and 37 deletions

View File

@ -35,7 +35,7 @@
*
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
*
* $Id: fdesc_vnops.c,v 1.16 1996/06/12 03:37:02 davidg Exp $
* $Id: fdesc_vnops.c,v 1.17 1996/06/12 05:09:52 gpalmer Exp $
*/
/*
@ -48,6 +48,7 @@
#include <sys/kernel.h> /* boottime */
#include <sys/resourcevar.h>
#include <sys/filedesc.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/malloc.h>
#include <sys/file.h>

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)fifo_vnops.c 8.2 (Berkeley) 1/4/94
* $Id: fifo_vnops.c,v 1.15 1995/12/14 09:53:03 phk Exp $
* $Id: fifo_vnops.c,v 1.16 1996/02/13 18:16:23 wollman Exp $
*/
#include <sys/param.h>
@ -39,6 +39,7 @@
#include <sys/proc.h>
#include <sys/time.h>
#include <sys/namei.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/socket.h>
#include <sys/socketvar.h>

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_vnops.c,v 1.30 1995/12/07 12:47:20 davidg Exp $ */
/* $Id: msdosfs_vnops.c,v 1.31 1996/06/14 11:01:41 asami Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */
/*-
@ -53,11 +53,11 @@
#include <sys/namei.h>
#include <sys/resourcevar.h> /* defines plimit structure in proc struct */
#include <sys/kernel.h>
#include <sys/file.h> /* define FWRITE ... */
#include <sys/stat.h>
#include <sys/buf.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <miscfs/specfs/specdev.h> /* XXX */ /* defines v_rdev */
#include <sys/malloc.h>

View File

@ -35,7 +35,7 @@
*
* @(#)portal_vnops.c 8.8 (Berkeley) 1/21/94
*
* $Id: portal_vnops.c,v 1.12 1996/06/12 03:37:29 davidg Exp $
* $Id: portal_vnops.c,v 1.13 1996/06/12 05:09:59 gpalmer Exp $
*/
/*
@ -50,6 +50,7 @@
#include <sys/time.h>
#include <sys/proc.h>
#include <sys/filedesc.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/file.h>
#include <sys/stat.h>

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vnops.c 8.6 (Berkeley) 2/7/94
*
* $Id: procfs_vnops.c,v 1.22 1996/06/17 22:43:36 dyson Exp $
* $Id: procfs_vnops.c,v 1.23 1996/06/18 05:16:00 dyson Exp $
*/
/*
@ -47,8 +47,9 @@
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/kernel.h>
#include <sys/file.h>
#include <sys/fcntl.h>
#include <sys/proc.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/namei.h>
#include <sys/malloc.h>

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.6 (Berkeley) 4/9/94
* $Id: spec_vnops.c,v 1.30 1996/07/27 03:50:31 dyson Exp $
* $Id: spec_vnops.c,v 1.31 1996/08/21 21:55:33 dyson Exp $
*/
#include <sys/param.h>
@ -42,11 +42,12 @@
#include <sys/buf.h>
#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/stat.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <sys/fcntl.h>
#include <sys/disklabel.h>
#include <sys/vmmeter.h>

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
* $Id: kern_fork.c,v 1.24 1996/08/19 02:28:24 julian Exp $
* $Id: kern_fork.c,v 1.25 1996/08/22 03:50:18 julian Exp $
*/
#include "opt_ktrace.h"
@ -50,9 +50,9 @@
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/vnode.h>
#include <sys/file.h>
#include <sys/acct.h>
#include <sys/ktrace.h>
#include <sys/unistd.h>
#include <vm/vm.h>
#include <vm/vm_param.h>

View File

@ -34,14 +34,14 @@
* SUCH DAMAGE.
*
* @(#)ufs_lockf.c 8.3 (Berkeley) 1/6/94
* $Id: kern_lockf.c,v 1.4 1995/05/30 08:05:31 rgrimes Exp $
* $Id: kern_lockf.c,v 1.5 1995/12/14 08:31:26 phk Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/file.h>
#include <sys/proc.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/malloc.h>
#include <sys/fcntl.h>

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.48 1996/05/24 16:19:23 peter Exp $
* $Id: vfs_syscalls.c,v 1.49 1996/09/03 07:09:03 davidg Exp $
*/
/*
@ -56,6 +56,7 @@
#include <sys/kernel.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/mount.h>
#include <sys/proc.h>

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.48 1996/05/24 16:19:23 peter Exp $
* $Id: vfs_syscalls.c,v 1.49 1996/09/03 07:09:03 davidg Exp $
*/
/*
@ -56,6 +56,7 @@
#include <sys/kernel.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/mount.h>
#include <sys/proc.h>

View File

@ -1,7 +1,7 @@
/*
* Written by Julian Elischer (julian@DIALix.oz.au)
*
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.22 1996/08/13 07:21:45 julian Exp $
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.23 1996/08/13 19:48:41 julian Exp $
*
* symlinks can wait 'til later.
*/
@ -11,11 +11,11 @@
#include <sys/namei.h>
#include <sys/resourcevar.h> /* defines plimit structure in proc struct */
#include <sys/kernel.h>
#include <sys/file.h> /* define FWRITE ... */
#include <sys/stat.h>
#include <sys/buf.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <miscfs/specfs/specdev.h>/* definitions of spec functions we use */
#include <sys/malloc.h>

View File

@ -35,7 +35,7 @@
*
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
*
* $Id: fdesc_vnops.c,v 1.16 1996/06/12 03:37:02 davidg Exp $
* $Id: fdesc_vnops.c,v 1.17 1996/06/12 05:09:52 gpalmer Exp $
*/
/*
@ -48,6 +48,7 @@
#include <sys/kernel.h> /* boottime */
#include <sys/resourcevar.h>
#include <sys/filedesc.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/malloc.h>
#include <sys/file.h>

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)fifo_vnops.c 8.2 (Berkeley) 1/4/94
* $Id: fifo_vnops.c,v 1.15 1995/12/14 09:53:03 phk Exp $
* $Id: fifo_vnops.c,v 1.16 1996/02/13 18:16:23 wollman Exp $
*/
#include <sys/param.h>
@ -39,6 +39,7 @@
#include <sys/proc.h>
#include <sys/time.h>
#include <sys/namei.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/socket.h>
#include <sys/socketvar.h>

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)kernfs_vnops.c 8.6 (Berkeley) 2/10/94
* $Id: kernfs_vnops.c,v 1.14 1995/12/03 14:54:16 bde Exp $
* $Id: kernfs_vnops.c,v 1.15 1996/07/03 03:48:46 phk Exp $
*/
/*
@ -48,9 +48,10 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/proc.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/malloc.h>
#include <sys/file.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/mount.h>
#include <sys/namei.h>

View File

@ -35,7 +35,7 @@
*
* @(#)portal_vnops.c 8.8 (Berkeley) 1/21/94
*
* $Id: portal_vnops.c,v 1.12 1996/06/12 03:37:29 davidg Exp $
* $Id: portal_vnops.c,v 1.13 1996/06/12 05:09:59 gpalmer Exp $
*/
/*
@ -50,6 +50,7 @@
#include <sys/time.h>
#include <sys/proc.h>
#include <sys/filedesc.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/file.h>
#include <sys/stat.h>

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vnops.c 8.6 (Berkeley) 2/7/94
*
* $Id: procfs_vnops.c,v 1.22 1996/06/17 22:43:36 dyson Exp $
* $Id: procfs_vnops.c,v 1.23 1996/06/18 05:16:00 dyson Exp $
*/
/*
@ -47,8 +47,9 @@
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/kernel.h>
#include <sys/file.h>
#include <sys/fcntl.h>
#include <sys/proc.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/namei.h>
#include <sys/malloc.h>

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.6 (Berkeley) 4/9/94
* $Id: spec_vnops.c,v 1.30 1996/07/27 03:50:31 dyson Exp $
* $Id: spec_vnops.c,v 1.31 1996/08/21 21:55:33 dyson Exp $
*/
#include <sys/param.h>
@ -42,11 +42,12 @@
#include <sys/buf.h>
#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/stat.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <sys/fcntl.h>
#include <sys/disklabel.h>
#include <sys/vmmeter.h>

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_vnops.c,v 1.30 1995/12/07 12:47:20 davidg Exp $ */
/* $Id: msdosfs_vnops.c,v 1.31 1996/06/14 11:01:41 asami Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */
/*-
@ -53,11 +53,11 @@
#include <sys/namei.h>
#include <sys/resourcevar.h> /* defines plimit structure in proc struct */
#include <sys/kernel.h>
#include <sys/file.h> /* define FWRITE ... */
#include <sys/stat.h>
#include <sys/buf.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <miscfs/specfs/specdev.h> /* XXX */ /* defines v_rdev */
#include <sys/malloc.h>

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
* $Id: nfs_serv.c,v 1.30 1996/06/08 12:16:26 bde Exp $
* $Id: nfs_serv.c,v 1.31 1996/08/21 21:55:48 dyson Exp $
*/
/*
@ -60,8 +60,8 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/file.h>
#include <sys/namei.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/mount.h>
#include <sys/socket.h>

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
* $Id: nfs_serv.c,v 1.30 1996/06/08 12:16:26 bde Exp $
* $Id: nfs_serv.c,v 1.31 1996/08/21 21:55:48 dyson Exp $
*/
/*
@ -60,8 +60,8 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/file.h>
#include <sys/namei.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/mount.h>
#include <sys/socket.h>

View File

@ -31,14 +31,16 @@
* SUCH DAMAGE.
*
* @(#)file.h 8.3 (Berkeley) 1/9/95
* $Id: file.h,v 1.8 1996/02/29 00:07:11 hsu Exp $
* $Id: file.h,v 1.7 1996/03/11 02:16:40 hsu Exp $
*/
#ifndef _SYS_FILE_H_
#define _SYS_FILE_H_
#define _SYS_FILE_H_
#include <sys/fcntl.h>
#ifndef KERNEL
#include <sys/unistd.h>
#endif
#ifdef KERNEL
#include <sys/queue.h>
@ -84,4 +86,4 @@ extern int nfiles; /* actual number of open files */
#endif /* KERNEL */
#endif
#endif /* !SYS_FILE_H */

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_vnops.c 8.10 (Berkeley) 4/1/94
* $Id: ufs_vnops.c,v 1.38 1996/03/29 12:30:30 bde Exp $
* $Id: ufs_vnops.c,v 1.39 1996/07/09 16:51:18 wollman Exp $
*/
#include "opt_quota.h"
@ -46,12 +46,13 @@
#include <sys/namei.h>
#include <sys/resourcevar.h>
#include <sys/kernel.h>
#include <sys/file.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <sys/buf.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/mount.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/malloc.h>
#include <sys/dirent.h>