1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Reduce the number of #include dependencies by declaring some of the structs

used in pseudofs.h as opaque structs.
This commit is contained in:
Dag-Erling Smørgrav 2001-11-03 03:07:09 +00:00
parent c253329a84
commit 41aa8697b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85940
4 changed files with 19 additions and 6 deletions

View File

@ -49,6 +49,10 @@ static MALLOC_DEFINE(M_PFSNODES, "pfs_nodes", "pseudofs nodes");
SYSCTL_NODE(_vfs, OID_AUTO, pfs, CTLFLAG_RW, 0,
"pseudofs");
#if PFS_FSNAMELEN != MFSNAMELEN
#error "PFS_FSNAMELEN is not equal to MFSNAMELEN"
#endif
/*
* Add a node to a directory
*/

View File

@ -31,10 +31,24 @@
#ifndef _PSEUDOFS_H_INCLUDED
#define _PSEUDOFS_H_INCLUDED
/*
* Opaque structures
*/
struct mount;
struct nameidata;
struct proc;
struct sbuf;
struct statfs;
struct thread;
struct uio;
struct vfsconf;
struct vnode;
/*
* Limits and constants
*/
#define PFS_NAMELEN 24
#define PFS_FSNAMELEN 16 /* equal to MFSNAMELEN */
#define PFS_DELEN (8 + PFS_NAMELEN)
typedef enum {
@ -122,7 +136,7 @@ typedef int (*pfs_ioctl_t)(PFS_IOCTL_ARGS);
* pfs_info: describes a pseudofs instance
*/
struct pfs_info {
char pi_name[MFSNAMELEN];
char pi_name[PFS_FSNAMELEN];
pfs_init_t pi_init;
pfs_init_t pi_uninit;
/* members below this line aren't initialized */

View File

@ -33,10 +33,7 @@
#include <sys/systm.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mount.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/sbuf.h>
#include <sys/sysctl.h>
#include <machine/limits.h>

View File

@ -33,10 +33,8 @@
#include <sys/systm.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mount.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/sbuf.h>
#include <sys/sysctl.h>
#include <sys/vnode.h>