diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 29996f66b8ae..0ba3abc7f5a3 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -1,4 +1,4 @@ -/* $NetBSD: mount.h,v 1.228 2017/05/24 09:53:55 hannken Exp $ */ +/* $NetBSD: mount.h,v 1.229 2017/06/09 00:13:29 chs Exp $ */ /* * Copyright (c) 1989, 1991, 1993 @@ -44,14 +44,16 @@ #ifndef _STANDALONE #include /* precautionary upon removal from ucred.h */ #include -#include #include #include +#include +#if defined(_KERNEL) || defined(__EXPOSE_MOUNT) +#include #include #include -#include #include #include +#endif /* defined(_KERNEL) || defined(__EXPOSE_MOUNT) */ #endif /* !_STANDALONE */ /* @@ -97,8 +99,27 @@ #define MOUNT_RUMPFS "rumpfs" /* rump virtual file system */ #define MOUNT_V7FS "v7fs" /* 7th Edition of Unix Filesystem */ +/* + * Sysctl CTL_VFS definitions. + * + * Second level identifier specifies which filesystem. Second level + * identifier VFS_GENERIC returns information about all filesystems. + * + * Note the slightly non-flat nature of these sysctl numbers. Oh for + * a better sysctl interface. + */ +#define VFS_GENERIC 0 /* generic filesystem information */ +#define VFS_MAXTYPENUM 1 /* int: highest defined fs type */ +#define VFS_CONF 2 /* struct: vfsconf for filesystem given + as next argument */ +#define VFS_USERMOUNT 3 /* enable/disable fs mnt by non-root */ +#define VFS_MAGICLINKS 4 /* expand 'magic' symlinks */ +#define VFSGEN_MAXID 5 /* number of valid vfs.generic ids */ + #ifndef _STANDALONE +#if defined(_KERNEL) || defined(__EXPOSE_MOUNT) + struct vnode; struct vnode_impl; struct vattr; @@ -133,22 +154,9 @@ struct mount { uint64_t mnt_gen; }; -/* - * Sysctl CTL_VFS definitions. - * - * Second level identifier specifies which filesystem. Second level - * identifier VFS_GENERIC returns information about all filesystems. - * - * Note the slightly non-flat nature of these sysctl numbers. Oh for - * a better sysctl interface. - */ -#define VFS_GENERIC 0 /* generic filesystem information */ -#define VFS_MAXTYPENUM 1 /* int: highest defined fs type */ -#define VFS_CONF 2 /* struct: vfsconf for filesystem given - as next argument */ -#define VFS_USERMOUNT 3 /* enable/disable fs mnt by non-root */ -#define VFS_MAGICLINKS 4 /* expand 'magic' symlinks */ -#define VFSGEN_MAXID 5 /* number of valid vfs.generic ids */ +#endif /* defined(_KERNEL) || defined(__EXPOSE_MOUNT) */ + +#ifdef _KERNEL /* * USE THE SAME NAMES AS MOUNT_*! @@ -189,8 +197,6 @@ struct mount { { "magiclinks", CTLTYPE_INT }, \ } -#if defined(_KERNEL) - struct quotactl_args; /* in sys/quotactl.h */ struct quotastat; /* in sys/quotactl.h */ struct quotaidtypestat; /* in sys/quotactl.h */ @@ -199,10 +205,6 @@ struct quotakcursor; /* in sys/quotactl.h */ struct quotakey; /* in sys/quota.h */ struct quotaval; /* in sys/quota.h */ -#if __STDC__ -struct nameidata; -#endif - /* * Operations supported on mounted file system. */ @@ -268,14 +270,8 @@ int VFS_SNAPSHOT(struct mount *, struct vnode *, struct timespec *); int VFS_EXTATTRCTL(struct mount *, int, struct vnode *, int, const char *); int VFS_SUSPENDCTL(struct mount *, int); -#endif /* _KERNEL */ - -#ifdef _KERNEL -#if __STDC__ -struct mbuf; struct vnodeopv_desc; struct kauth_cred; -#endif #define VFS_MAX_MOUNT_DATA 8192 diff --git a/usr.bin/fstat/ptyfs.c b/usr.bin/fstat/ptyfs.c index 9ddd07e7fbb8..fe037b0529bd 100644 --- a/usr.bin/fstat/ptyfs.c +++ b/usr.bin/fstat/ptyfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: ptyfs.c,v 1.6 2009/04/12 06:36:12 lukem Exp $ */ +/* $NetBSD: ptyfs.c,v 1.7 2017/06/09 00:13:29 chs Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: ptyfs.c,v 1.6 2009/04/12 06:36:12 lukem Exp $"); +__RCSID("$NetBSD: ptyfs.c,v 1.7 2017/06/09 00:13:29 chs Exp $"); #include #include @@ -38,6 +38,7 @@ __RCSID("$NetBSD: ptyfs.c,v 1.6 2009/04/12 06:36:12 lukem Exp $"); #include #include #include +#define __EXPOSE_MOUNT #include #include diff --git a/usr.bin/fstat/tmpfs.c b/usr.bin/fstat/tmpfs.c index 2899271ea5da..842b61ef2be6 100644 --- a/usr.bin/fstat/tmpfs.c +++ b/usr.bin/fstat/tmpfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs.c,v 1.10 2016/01/23 16:12:03 christos Exp $ */ +/* $NetBSD: tmpfs.c,v 1.11 2017/06/09 00:13:29 chs Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: tmpfs.c,v 1.10 2016/01/23 16:12:03 christos Exp $"); +__RCSID("$NetBSD: tmpfs.c,v 1.11 2017/06/09 00:13:29 chs Exp $"); #include #include @@ -35,6 +35,7 @@ __RCSID("$NetBSD: tmpfs.c,v 1.10 2016/01/23 16:12:03 christos Exp $"); #include #include #include +#define __EXPOSE_MOUNT #include #include diff --git a/usr.bin/pmap/pmap.h b/usr.bin/pmap/pmap.h index da9a2ba7b111..2b13a5aaae5f 100644 --- a/usr.bin/pmap/pmap.h +++ b/usr.bin/pmap/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.9 2016/12/22 22:41:02 mrg Exp $ */ +/* $NetBSD: pmap.h,v 1.10 2017/06/09 00:13:29 chs Exp $ */ /* * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -46,6 +46,7 @@ #include #include #include +#define __EXPOSE_MOUNT #include #include #include diff --git a/usr.bin/systat/bufcache.c b/usr.bin/systat/bufcache.c index 6af61d99730a..5e8a3efed2be 100644 --- a/usr.bin/systat/bufcache.c +++ b/usr.bin/systat/bufcache.c @@ -1,4 +1,4 @@ -/* $NetBSD: bufcache.c,v 1.27 2016/10/24 00:40:17 christos Exp $ */ +/* $NetBSD: bufcache.c,v 1.28 2017/06/09 00:13:29 chs Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -31,11 +31,12 @@ #include #ifndef lint -__RCSID("$NetBSD: bufcache.c,v 1.27 2016/10/24 00:40:17 christos Exp $"); +__RCSID("$NetBSD: bufcache.c,v 1.28 2017/06/09 00:13:29 chs Exp $"); #endif /* not lint */ #include #include +#define __EXPOSE_MOUNT #include #include #include