xref: /csrg-svn/sys/miscfs/kernfs/kernfs.h (revision 68617)
155344Spendry /*
263233Sbostic  * Copyright (c) 1992, 1993
363233Sbostic  *	The Regents of the University of California.  All rights reserved.
455344Spendry  *
555344Spendry  * This code is derived from software donated to Berkeley by
655344Spendry  * Jan-Simon Pendry.
755344Spendry  *
855344Spendry  * %sccs.include.redist.c%
955344Spendry  *
10*68617Smckusick  *	@(#)kernfs.h	8.6 (Berkeley) 03/29/95
1155344Spendry  */
1255344Spendry 
1355357Spendry #define	_PATH_KERNFS	"/kern"		/* Default mountpoint */
1455357Spendry 
1555344Spendry #ifdef KERNEL
1655344Spendry struct kernfs_mount {
1755344Spendry 	struct vnode	*kf_root;	/* Root node */
1855344Spendry };
1955344Spendry 
2055344Spendry struct kernfs_node {
2155344Spendry 	struct kern_target *kf_kt;
2255344Spendry };
2355344Spendry 
2455344Spendry #define VFSTOKERNFS(mp)	((struct kernfs_mount *)((mp)->mnt_data))
2555344Spendry #define	VTOKERN(vp) ((struct kernfs_node *)(vp)->v_data)
2655344Spendry 
27*68617Smckusick #define kernfs_fhtovp ((int (*) __P((struct mount *, struct fid *, \
28*68617Smckusick 	    struct mbuf *, struct vnode **, int *, struct ucred **)))eopnotsupp)
29*68617Smckusick #define kernfs_quotactl ((int (*) __P((struct mount *, int, uid_t, caddr_t, \
30*68617Smckusick 	    struct proc *)))eopnotsupp)
31*68617Smckusick #define kernfs_sync ((int (*) __P((struct mount *, int, struct ucred *, \
32*68617Smckusick 	    struct proc *)))nullop)
33*68617Smckusick #define kernfs_sysctl ((int (*) __P((int *, u_int, void *, size_t *, void *, \
34*68617Smckusick 	    size_t, struct proc *)))eopnotsupp)
35*68617Smckusick #define kernfs_vget ((int (*) __P((struct mount *, ino_t, struct vnode **))) \
36*68617Smckusick 	    eopnotsupp)
37*68617Smckusick #define kernfs_vptofh ((int (*) __P((struct vnode *, struct fid *)))eopnotsupp)
3855344Spendry extern int (**kernfs_vnodeop_p)();
3955344Spendry extern struct vfsops kernfs_vfsops;
4067387Spendry extern dev_t rrootdev;
4155344Spendry #endif /* KERNEL */
42