rearrange sys/mount.h so that all of the kernel-only parts are together
and not exposed to userland, except do expose struct mount if __EXPOSE_MOUNT is defined. define __EXPOSE_MOUNT in the kmem grovellers that want the definition. needed for ZFS.
This commit is contained in:
parent
8903716be3
commit
ffdbc0ccea
|
@ -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 <sys/param.h> /* precautionary upon removal from ucred.h */
|
||||
#include <sys/time.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/ucred.h>
|
||||
#include <sys/fstypes.h>
|
||||
#include <sys/statvfs.h>
|
||||
#if defined(_KERNEL) || defined(__EXPOSE_MOUNT)
|
||||
#include <sys/uio.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/rwlock.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <sys/specificdata.h>
|
||||
#include <sys/condvar.h>
|
||||
#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
|
||||
|
||||
|
|
|
@ -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 <sys/cdefs.h>
|
||||
__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 <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -38,6 +38,7 @@ __RCSID("$NetBSD: ptyfs.c,v 1.6 2009/04/12 06:36:12 lukem Exp $");
|
|||
#include <sys/proc.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/vnode.h>
|
||||
#define __EXPOSE_MOUNT
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
|
|
@ -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 <sys/cdefs.h>
|
||||
__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 <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -35,6 +35,7 @@ __RCSID("$NetBSD: tmpfs.c,v 1.10 2016/01/23 16:12:03 christos Exp $");
|
|||
#include <sys/proc.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/vnode.h>
|
||||
#define __EXPOSE_MOUNT
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <fs/tmpfs/tmpfs.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 <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/vnode.h>
|
||||
#define __EXPOSE_MOUNT
|
||||
#include <sys/mount.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/namei.h>
|
||||
|
|
|
@ -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 <sys/cdefs.h>
|
||||
#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 <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
#define __EXPOSE_MOUNT
|
||||
#include <sys/mount.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/vnode.h>
|
||||
|
|
Loading…
Reference in New Issue