diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-01-16 04:05:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-01-16 04:05:23 +0000 |
commit | 25194825487924f93cdde39b1844e85fcea56e6a (patch) | |
tree | 1baa2b86a0a17dfb0e3d2f598d42320bbd62c6be | |
parent | e823636a18b4deacea155d9dc20455a2766e6f8f (diff) |
do not expose NETDEV to userland from param.h
-rw-r--r-- | sys/nfs/nfs_vfsops.c | 3 | ||||
-rw-r--r-- | sys/sys/param.h | 3 | ||||
-rw-r--r-- | sys/sys/swap.h | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index bb91cb04877..4cd17d18cd0 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vfsops.c,v 1.94 2012/09/10 11:10:59 jsing Exp $ */ +/* $OpenBSD: nfs_vfsops.c,v 1.95 2013/01/16 04:05:22 deraadt Exp $ */ /* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */ /* @@ -44,6 +44,7 @@ #include <sys/vnode.h> #include <sys/kernel.h> #include <sys/mount.h> +#include <sys/swap.h> #include <sys/buf.h> #include <sys/mbuf.h> #include <sys/dirent.h> diff --git a/sys/sys/param.h b/sys/sys/param.h index e637827cc95..e20a5f45581 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.97 2012/12/05 23:20:24 deraadt Exp $ */ +/* $OpenBSD: param.h,v 1.98 2013/01/16 04:05:22 deraadt Exp $ */ /* $NetBSD: param.h,v 1.23 1996/03/17 01:02:29 thorpej Exp $ */ /*- @@ -116,7 +116,6 @@ #define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */ #define NODEV (dev_t)(-1) /* non-existent device */ -#define NETDEV (dev_t)(-2) /* network device (for nfs swap) */ #define CBLOCK 64 /* Clist block size, must be a power of 2. */ #define CBQSIZE (CBLOCK/NBBY) /* Quote bytes/cblock - can do better. */ diff --git a/sys/sys/swap.h b/sys/sys/swap.h index da79bb43cb1..08a90c7c1a8 100644 --- a/sys/sys/swap.h +++ b/sys/sys/swap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: swap.h,v 1.4 2001/06/27 04:51:48 art Exp $ */ +/* $OpenBSD: swap.h,v 1.5 2013/01/16 04:05:22 deraadt Exp $ */ /* $NetBSD: swap.h,v 1.2 1998/09/13 14:46:24 christos Exp $ */ /* @@ -52,6 +52,10 @@ struct swapent { char se_path[MAXPATHLEN]; /* path name */ }; +#ifdef _KERNEL +#define NETDEV (dev_t)(-2) /* network device (for nfs swap) */ +#endif /* _KERNEL */ + #define SWAP_ON 1 /* begin swapping on device */ #define SWAP_OFF 2 /* (stop swapping on device) */ #define SWAP_NSWAP 3 /* how many swap devices ? */ |