diff options
author | bde <bde@FreeBSD.org> | 1996-09-03 14:25:27 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-09-03 14:25:27 +0000 |
commit | 51ff523803ffa72907ef0cb5d9f95e36ac2b1b73 (patch) | |
tree | ba9e41138a27f4565955ba86fe3a5a131647e3fc /sys | |
parent | ad9b91037fe27c080ad2621696ce946fffdee225 (diff) | |
download | FreeBSD-src-51ff523803ffa72907ef0cb5d9f95e36ac2b1b73.zip FreeBSD-src-51ff523803ffa72907ef0cb5d9f95e36ac2b1b73.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 3 | ||||
-rw-r--r-- | sys/fs/fifofs/fifo_vnops.c | 3 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vnops.c | 4 | ||||
-rw-r--r-- | sys/fs/portalfs/portal_vnops.c | 3 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_vnops.c | 5 | ||||
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 5 | ||||
-rw-r--r-- | sys/kern/kern_fork.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_lockf.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_extattr.c | 3 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 3 | ||||
-rw-r--r-- | sys/miscfs/devfs/devfs_vnops.c | 4 | ||||
-rw-r--r-- | sys/miscfs/fdesc/fdesc_vnops.c | 3 | ||||
-rw-r--r-- | sys/miscfs/fifofs/fifo_vnops.c | 3 | ||||
-rw-r--r-- | sys/miscfs/kernfs/kernfs_vnops.c | 5 | ||||
-rw-r--r-- | sys/miscfs/portal/portal_vnops.c | 3 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 5 | ||||
-rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 5 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_serv.c | 4 | ||||
-rw-r--r-- | sys/nfsserver/nfs_serv.c | 4 | ||||
-rw-r--r-- | sys/sys/file.h | 8 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 5 |
22 files changed, 53 insertions, 37 deletions
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 27adb43..8b08090 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -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> diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index e6f1fee..ded0d5f 100644 --- a/sys/fs/fifofs/fifo_vnops.c +++ b/sys/fs/fifofs/fifo_vnops.c @@ -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> diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 83efc30..bdd399f 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -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> diff --git a/sys/fs/portalfs/portal_vnops.c b/sys/fs/portalfs/portal_vnops.c index e1ae904..a9d7328 100644 --- a/sys/fs/portalfs/portal_vnops.c +++ b/sys/fs/portalfs/portal_vnops.c @@ -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> diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index 6325969..cd1a550 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -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> diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 58241c2..6df8bad 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -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> diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index d037fbd..be88314 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -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> diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c index 8566a1d..98b3240 100644 --- a/sys/kern/kern_lockf.c +++ b/sys/kern/kern_lockf.c @@ -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> diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 3870776..206796b 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -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> diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 3870776..206796b 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -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> diff --git a/sys/miscfs/devfs/devfs_vnops.c b/sys/miscfs/devfs/devfs_vnops.c index 0f7d340..8f457ac 100644 --- a/sys/miscfs/devfs/devfs_vnops.c +++ b/sys/miscfs/devfs/devfs_vnops.c @@ -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> diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c index 27adb43..8b08090 100644 --- a/sys/miscfs/fdesc/fdesc_vnops.c +++ b/sys/miscfs/fdesc/fdesc_vnops.c @@ -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> diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c index e6f1fee..ded0d5f 100644 --- a/sys/miscfs/fifofs/fifo_vnops.c +++ b/sys/miscfs/fifofs/fifo_vnops.c @@ -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> diff --git a/sys/miscfs/kernfs/kernfs_vnops.c b/sys/miscfs/kernfs/kernfs_vnops.c index c01ee09..5841ed1 100644 --- a/sys/miscfs/kernfs/kernfs_vnops.c +++ b/sys/miscfs/kernfs/kernfs_vnops.c @@ -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> diff --git a/sys/miscfs/portal/portal_vnops.c b/sys/miscfs/portal/portal_vnops.c index e1ae904..a9d7328 100644 --- a/sys/miscfs/portal/portal_vnops.c +++ b/sys/miscfs/portal/portal_vnops.c @@ -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> diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index 6325969..cd1a550 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -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> diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 58241c2..6df8bad 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -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> diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index 83efc30..bdd399f 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -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> diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index fa89b35..116a2ba 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -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> diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index fa89b35..116a2ba 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -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> diff --git a/sys/sys/file.h b/sys/sys/file.h index 24b7d54..1eaa9d2 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -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 */ diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 2b8fd00..4084a11 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -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> |