aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2001-11-03 03:07:09 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2001-11-03 03:07:09 +0000
commit41aa8697b52e999654f69403b84090975f631650 (patch)
tree40534189945b2b458fc90201540d0949ab167ccc /sys
parentc253329a84e3ae642612242be017167cf0e3da20 (diff)
downloadsrc-41aa8697b52e999654f69403b84090975f631650.tar.gz
src-41aa8697b52e999654f69403b84090975f631650.zip
Reduce the number of #include dependencies by declaring some of the structs
used in pseudofs.h as opaque structs.
Notes
Notes: svn path=/head/; revision=85940
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/pseudofs/pseudofs.c4
-rw-r--r--sys/fs/pseudofs/pseudofs.h16
-rw-r--r--sys/fs/pseudofs/pseudofs_fileno.c3
-rw-r--r--sys/fs/pseudofs/pseudofs_vncache.c2
4 files changed, 19 insertions, 6 deletions
diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c
index b7299b3eb342..f7ecaab187a5 100644
--- a/sys/fs/pseudofs/pseudofs.c
+++ b/sys/fs/pseudofs/pseudofs.c
@@ -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
*/
diff --git a/sys/fs/pseudofs/pseudofs.h b/sys/fs/pseudofs/pseudofs.h
index fdcde59b5d13..b21d9b630730 100644
--- a/sys/fs/pseudofs/pseudofs.h
+++ b/sys/fs/pseudofs/pseudofs.h
@@ -32,9 +32,23 @@
#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 */
diff --git a/sys/fs/pseudofs/pseudofs_fileno.c b/sys/fs/pseudofs/pseudofs_fileno.c
index 24bfdbfcb1ad..778ef1befa45 100644
--- a/sys/fs/pseudofs/pseudofs_fileno.c
+++ b/sys/fs/pseudofs/pseudofs_fileno.c
@@ -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>
diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c
index d040b089c44e..71f6159f825f 100644
--- a/sys/fs/pseudofs/pseudofs_vncache.c
+++ b/sys/fs/pseudofs/pseudofs_vncache.c
@@ -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>