diff options
Diffstat (limited to 'sys/miscfs/nullfs')
-rw-r--r-- | sys/miscfs/nullfs/null_vfsops.c | 44 | ||||
-rw-r--r-- | sys/miscfs/nullfs/null_vnops.c | 39 |
2 files changed, 43 insertions, 40 deletions
diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c index b6ebc6c..3fd0582 100644 --- a/sys/miscfs/nullfs/null_vfsops.c +++ b/sys/miscfs/nullfs/null_vfsops.c @@ -36,7 +36,7 @@ * @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94 * * @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92 - * $Id: null_vfsops.c,v 1.7 1995/05/30 08:07:01 rgrimes Exp $ + * $Id: null_vfsops.c,v 1.8 1995/12/03 14:54:23 bde Exp $ */ /* @@ -57,29 +57,29 @@ extern int nullfs_init __P((void)); -extern int nullfs_fhtovp __P((struct mount *mp, struct fid *fidp, +static int nullfs_fhtovp __P((struct mount *mp, struct fid *fidp, struct mbuf *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)); -extern int nullfs_mount __P((struct mount *mp, char *path, caddr_t data, +static int nullfs_mount __P((struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, struct proc *p)); -extern int nullfs_quotactl __P((struct mount *mp, int cmd, uid_t uid, +static int nullfs_quotactl __P((struct mount *mp, int cmd, uid_t uid, caddr_t arg, struct proc *p)); -extern int nullfs_root __P((struct mount *mp, struct vnode **vpp)); -extern int nullfs_start __P((struct mount *mp, int flags, struct proc *p)); -extern int nullfs_statfs __P((struct mount *mp, struct statfs *sbp, +static int nullfs_root __P((struct mount *mp, struct vnode **vpp)); +static int nullfs_start __P((struct mount *mp, int flags, struct proc *p)); +static int nullfs_statfs __P((struct mount *mp, struct statfs *sbp, struct proc *p)); -extern int nullfs_sync __P((struct mount *mp, int waitfor, +static int nullfs_sync __P((struct mount *mp, int waitfor, struct ucred *cred, struct proc *p)); -extern int nullfs_unmount __P((struct mount *mp, int mntflags, +static int nullfs_unmount __P((struct mount *mp, int mntflags, struct proc *p)); -extern int nullfs_vget __P((struct mount *mp, ino_t ino, +static int nullfs_vget __P((struct mount *mp, ino_t ino, struct vnode **vpp)); -extern int nullfs_vptofh __P((struct vnode *vp, struct fid *fhp)); +static int nullfs_vptofh __P((struct vnode *vp, struct fid *fhp)); /* * Mount null layer */ -int +static int nullfs_mount(mp, path, data, ndp, p) struct mount *mp; char *path; @@ -185,7 +185,7 @@ nullfs_mount(mp, path, data, ndp, p) * on the underlying filesystem will have been called * when that filesystem was mounted. */ -int +static int nullfs_start(mp, flags, p) struct mount *mp; int flags; @@ -198,7 +198,7 @@ nullfs_start(mp, flags, p) /* * Free reference to null layer */ -int +static int nullfs_unmount(mp, mntflags, p) struct mount *mp; int mntflags; @@ -254,7 +254,7 @@ nullfs_unmount(mp, mntflags, p) return 0; } -int +static int nullfs_root(mp, vpp) struct mount *mp; struct vnode **vpp; @@ -278,7 +278,7 @@ nullfs_root(mp, vpp) return 0; } -int +static int nullfs_quotactl(mp, cmd, uid, arg, p) struct mount *mp; int cmd; @@ -289,7 +289,7 @@ nullfs_quotactl(mp, cmd, uid, arg, p) return VFS_QUOTACTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, uid, arg, p); } -int +static int nullfs_statfs(mp, sbp, p) struct mount *mp; struct statfs *sbp; @@ -329,7 +329,7 @@ nullfs_statfs(mp, sbp, p) return (0); } -int +static int nullfs_sync(mp, waitfor, cred, p) struct mount *mp; int waitfor; @@ -342,7 +342,7 @@ nullfs_sync(mp, waitfor, cred, p) return (0); } -int +static int nullfs_vget(mp, ino, vpp) struct mount *mp; ino_t ino; @@ -352,7 +352,7 @@ nullfs_vget(mp, ino, vpp) return VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, vpp); } -int +static int nullfs_fhtovp(mp, fidp, nam, vpp, exflagsp, credanonp) struct mount *mp; struct fid *fidp; @@ -365,7 +365,7 @@ nullfs_fhtovp(mp, fidp, nam, vpp, exflagsp, credanonp) return VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, nam, vpp, exflagsp,credanonp); } -int +static int nullfs_vptofh(vp, fhp) struct vnode *vp; struct fid *fhp; @@ -373,7 +373,7 @@ nullfs_vptofh(vp, fhp) return VFS_VPTOFH(NULLVPTOLOWERVP(vp), fhp); } -struct vfsops null_vfsops = { +static struct vfsops null_vfsops = { nullfs_mount, nullfs_start, nullfs_unmount, diff --git a/sys/miscfs/nullfs/null_vnops.c b/sys/miscfs/nullfs/null_vnops.c index 4013f50..676e767 100644 --- a/sys/miscfs/nullfs/null_vnops.c +++ b/sys/miscfs/nullfs/null_vnops.c @@ -35,7 +35,7 @@ * * @(#)null_vnops.c 8.1 (Berkeley) 6/10/93 * - * $Id: null_vnops.c,v 1.9 1995/11/09 08:14:51 bde Exp $ + * $Id: null_vnops.c,v 1.10 1995/12/03 14:54:24 bde Exp $ */ /* @@ -163,6 +163,7 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/sysctl.h> #include <sys/proc.h> #include <sys/time.h> #include <sys/types.h> @@ -173,15 +174,17 @@ #include <sys/buf.h> #include <miscfs/nullfs/null.h> -int null_bug_bypass = 0; /* for debugging: enables bypass printf'ing */ +static int null_bug_bypass = 0; /* for debugging: enables bypass printf'ing */ +SYSCTL_INT(_debug, OID_AUTO, nullfs_bug_bypass, CTLFLAG_RW, + &null_bug_bypass, 0, ""); -extern int null_bypass __P((struct vop_generic_args *ap)); -extern int null_bwrite __P((struct vop_bwrite_args *ap)); -extern int null_getattr __P((struct vop_getattr_args *ap)); -extern int null_inactive __P((struct vop_inactive_args *ap)); -extern int null_print __P((struct vop_print_args *ap)); -extern int null_reclaim __P((struct vop_reclaim_args *ap)); -extern int null_strategy __P((struct vop_strategy_args *ap)); +static int null_bypass __P((struct vop_generic_args *ap)); +static int null_bwrite __P((struct vop_bwrite_args *ap)); +static int null_getattr __P((struct vop_getattr_args *ap)); +static int null_inactive __P((struct vop_inactive_args *ap)); +static int null_print __P((struct vop_print_args *ap)); +static int null_reclaim __P((struct vop_reclaim_args *ap)); +static int null_strategy __P((struct vop_strategy_args *ap)); /* * This is the 10-Apr-92 bypass routine. @@ -208,7 +211,7 @@ extern int null_strategy __P((struct vop_strategy_args *ap)); * - all mapped vnodes are of our vnode-type (NEEDSWORK: * problems on rmdir'ing mount points and renaming?) */ -int +static int null_bypass(ap) struct vop_generic_args /* { struct vnodeop_desc *a_desc; @@ -318,7 +321,7 @@ null_bypass(ap) /* * We handle getattr only to change the fsid. */ -int +static int null_getattr(ap) struct vop_getattr_args /* { struct vnode *a_vp; @@ -337,7 +340,7 @@ null_getattr(ap) } -int +static int null_inactive(ap) struct vop_inactive_args /* { struct vnode *a_vp; @@ -358,7 +361,7 @@ null_inactive(ap) return (0); } -int +static int null_reclaim(ap) struct vop_reclaim_args /* { struct vnode *a_vp; @@ -382,7 +385,7 @@ null_reclaim(ap) } -int +static int null_print(ap) struct vop_print_args /* { struct vnode *a_vp; @@ -399,7 +402,7 @@ null_print(ap) * vnode in its arguments. * This goes away with a merged VM/buffer cache. */ -int +static int null_strategy(ap) struct vop_strategy_args /* { struct buf *a_bp; @@ -425,7 +428,7 @@ null_strategy(ap) * vnode in its arguments. * This goes away with a merged VM/buffer cache. */ -int +static int null_bwrite(ap) struct vop_bwrite_args /* { struct buf *a_bp; @@ -449,7 +452,7 @@ null_bwrite(ap) * Global vfs data structures */ vop_t **null_vnodeop_p; -struct vnodeopv_entry_desc null_vnodeop_entries[] = { +static struct vnodeopv_entry_desc null_vnodeop_entries[] = { { &vop_default_desc, (vop_t *)null_bypass }, { &vop_getattr_desc, (vop_t *)null_getattr }, @@ -462,7 +465,7 @@ struct vnodeopv_entry_desc null_vnodeop_entries[] = { { NULL, NULL } }; -struct vnodeopv_desc null_vnodeop_opv_desc = +static struct vnodeopv_desc null_vnodeop_opv_desc = { &null_vnodeop_p, null_vnodeop_entries }; VNODEOP_SET(null_vnodeop_opv_desc); |