From db4618638eac1ee5e4467203d2bbdb046487c7e0 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 18 Nov 1997 15:07:35 +0000 Subject: Staticize. --- sys/fs/unionfs/union.h | 10 +--------- sys/fs/unionfs/union_subr.c | 27 +++++++++++++++++---------- sys/fs/unionfs/union_vfsops.c | 26 ++++++++++++-------------- sys/miscfs/union/union.h | 10 +--------- sys/miscfs/union/union_subr.c | 27 +++++++++++++++++---------- sys/miscfs/union/union_vfsops.c | 26 ++++++++++++-------------- 6 files changed, 60 insertions(+), 66 deletions(-) (limited to 'sys') diff --git a/sys/fs/unionfs/union.h b/sys/fs/unionfs/union.h index 192aa7d..03e7033 100644 --- a/sys/fs/unionfs/union.h +++ b/sys/fs/unionfs/union.h @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union.h 8.9 (Berkeley) 12/10/94 - * $Id$ + * $Id: union.h,v 1.8 1997/02/22 09:40:40 peter Exp $ */ struct union_args { @@ -99,8 +99,6 @@ extern int union_allocvp __P((struct vnode **, struct mount *, struct componentname *, struct vnode *, struct vnode *, int)); extern int union_freevp __P((struct vnode *)); -extern int union_copyfile __P((struct vnode *, struct vnode *, - struct ucred *, struct proc *)); extern struct vnode *union_dircache __P((struct vnode *, struct proc *)); extern int union_copyup __P((struct union_node *, int, struct ucred *, struct proc *)); @@ -110,16 +108,10 @@ extern int union_mkshadow __P((struct union_mount *, struct vnode *, struct componentname *, struct vnode **)); extern int union_mkwhiteout __P((struct union_mount *, struct vnode *, struct componentname *, char *)); -extern int union_vn_create __P((struct vnode **, struct union_node *, - struct proc *)); -extern int union_vn_close __P((struct vnode *, int, struct ucred *, - struct proc *)); extern int union_cn_close __P((struct vnode *, int, struct ucred *, struct proc *)); extern void union_removed_upper __P((struct union_node *un)); extern struct vnode *union_lowervp __P((struct vnode *)); -extern void union_newlower __P((struct union_node *, struct vnode *)); -extern void union_newupper __P((struct union_node *, struct vnode *)); extern void union_newsize __P((struct vnode *, off_t, off_t)); #define MOUNTTOUNIONMOUNT(mp) ((struct union_mount *)((mp)->mnt_data)) diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index faf9ec9..8985d87 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_subr.c 8.20 (Berkeley) 5/20/95 - * $Id: union_subr.c,v 1.20 1997/08/14 03:57:46 kato Exp $ + * $Id: union_subr.c,v 1.21 1997/09/21 04:23:32 dyson Exp $ */ #include @@ -74,9 +74,17 @@ static int union_relookup __P((struct union_mount *um, struct vnode *dvp, struct componentname *cnp, struct componentname *cn, char *path, int pathlen)); -extern void union_updatevp __P((struct union_node *un, +static void union_updatevp __P((struct union_node *un, struct vnode *uppervp, struct vnode *lowervp)); +static void union_newlower __P((struct union_node *, struct vnode *)); +static void union_newupper __P((struct union_node *, struct vnode *)); +static int union_copyfile __P((struct vnode *, struct vnode *, + struct ucred *, struct proc *)); +static int union_vn_create __P((struct vnode **, struct union_node *, + struct proc *)); +static int union_vn_close __P((struct vnode *, int, struct ucred *, + struct proc *)); int union_init() @@ -118,7 +126,7 @@ union_list_unlock(ix) } } -void +static void union_updatevp(un, uppervp, lowervp) struct union_node *un; struct vnode *uppervp; @@ -127,7 +135,7 @@ union_updatevp(un, uppervp, lowervp) int ohash = UNION_HASH(un->un_uppervp, un->un_lowervp); int nhash = UNION_HASH(uppervp, lowervp); int docache = (lowervp != NULLVP || uppervp != NULLVP); - int lhash, hhash, uhash; + int lhash, uhash; /* * Ensure locking is ordered from lower to higher @@ -190,7 +198,7 @@ union_updatevp(un, uppervp, lowervp) union_list_unlock(nhash); } -void +static void union_newlower(un, lowervp) struct union_node *un; struct vnode *lowervp; @@ -199,7 +207,7 @@ union_newlower(un, lowervp) union_updatevp(un, un->un_uppervp, lowervp); } -void +static void union_newupper(un, uppervp) struct union_node *un; struct vnode *uppervp; @@ -568,7 +576,7 @@ union_freevp(vp) * using a sequence of reads and writes. both (fvp) * and (tvp) are locked on entry and exit. */ -int +static int union_copyfile(fvp, tvp, cred, p) struct vnode *fvp; struct vnode *tvp; @@ -840,7 +848,6 @@ union_mkwhiteout(um, dvp, cnp, path) char *path; { int error; - struct vattr va; struct proc *p = cnp->cn_proc; struct vnode *wvp; struct componentname cn; @@ -879,7 +886,7 @@ union_mkwhiteout(um, dvp, cnp, path) * things, and b) it doesn't start at the "right" directory, * whereas relookup is told where to start. */ -int +static int union_vn_create(vpp, un, p) struct vnode **vpp; struct union_node *un; @@ -960,7 +967,7 @@ union_vn_create(vpp, un, p) return (0); } -int +static int union_vn_close(vp, fmode, cred, p) struct vnode *vp; int fmode; diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index 5ace7ce..753afd6 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95 - * $Id: union_vfsops.c,v 1.20 1997/09/27 13:39:29 kato Exp $ + * $Id: union_vfsops.c,v 1.21 1997/10/12 20:24:57 phk Exp $ */ /* @@ -60,17 +60,17 @@ extern int union_init __P((struct vfsconf *)); extern int union_fhtovp __P((struct mount *mp, struct fid *fidp, struct mbuf *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)); -extern int union_mount __P((struct mount *mp, char *path, caddr_t data, +static int union_mount __P((struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, struct proc *p)); extern int union_quotactl __P((struct mount *mp, int cmd, uid_t uid, caddr_t arg, struct proc *p)); -extern int union_root __P((struct mount *mp, struct vnode **vpp)); -extern int union_start __P((struct mount *mp, int flags, struct proc *p)); -extern int union_statfs __P((struct mount *mp, struct statfs *sbp, +static int union_root __P((struct mount *mp, struct vnode **vpp)); +static int union_start __P((struct mount *mp, int flags, struct proc *p)); +static int union_statfs __P((struct mount *mp, struct statfs *sbp, struct proc *p)); extern int union_sync __P((struct mount *mp, int waitfor, struct ucred *cred, struct proc *p)); -extern int union_unmount __P((struct mount *mp, int mntflags, +static int union_unmount __P((struct mount *mp, int mntflags, struct proc *p)); extern int union_vget __P((struct mount *mp, ino_t ino, struct vnode **vpp)); @@ -79,7 +79,7 @@ extern int union_vptofh __P((struct vnode *vp, struct fid *fhp)); /* * Mount union filesystem */ -int +static int union_mount(mp, path, data, ndp, p) struct mount *mp; char *path; @@ -93,8 +93,6 @@ union_mount(mp, path, data, ndp, p) struct vnode *upperrootvp = NULLVP; struct union_mount *um = 0; struct ucred *cred = 0; - struct ucred *scred; - struct vattr va; char *cp = 0; int len; u_int size; @@ -303,7 +301,7 @@ bad: * on the underlying filesystem(s) will have been called * when that filesystem was mounted. */ -int +static int union_start(mp, flags, p) struct mount *mp; int flags; @@ -316,7 +314,7 @@ union_start(mp, flags, p) /* * Free reference to union layer */ -int +static int union_unmount(mp, mntflags, p) struct mount *mp; int mntflags; @@ -397,7 +395,7 @@ union_unmount(mp, mntflags, p) return (0); } -int +static int union_root(mp, vpp) struct mount *mp; struct vnode **vpp; @@ -454,7 +452,7 @@ union_root(mp, vpp) return (error); } -int +static int union_statfs(mp, sbp, p) struct mount *mp; struct statfs *sbp; @@ -547,7 +545,7 @@ union_statfs(mp, sbp, p) eopnotsupp) #define union_vptofh ((int (*) __P((struct vnode *, struct fid *)))eopnotsupp) -struct vfsops union_vfsops = { +static struct vfsops union_vfsops = { union_mount, union_start, union_unmount, diff --git a/sys/miscfs/union/union.h b/sys/miscfs/union/union.h index 192aa7d..03e7033 100644 --- a/sys/miscfs/union/union.h +++ b/sys/miscfs/union/union.h @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union.h 8.9 (Berkeley) 12/10/94 - * $Id$ + * $Id: union.h,v 1.8 1997/02/22 09:40:40 peter Exp $ */ struct union_args { @@ -99,8 +99,6 @@ extern int union_allocvp __P((struct vnode **, struct mount *, struct componentname *, struct vnode *, struct vnode *, int)); extern int union_freevp __P((struct vnode *)); -extern int union_copyfile __P((struct vnode *, struct vnode *, - struct ucred *, struct proc *)); extern struct vnode *union_dircache __P((struct vnode *, struct proc *)); extern int union_copyup __P((struct union_node *, int, struct ucred *, struct proc *)); @@ -110,16 +108,10 @@ extern int union_mkshadow __P((struct union_mount *, struct vnode *, struct componentname *, struct vnode **)); extern int union_mkwhiteout __P((struct union_mount *, struct vnode *, struct componentname *, char *)); -extern int union_vn_create __P((struct vnode **, struct union_node *, - struct proc *)); -extern int union_vn_close __P((struct vnode *, int, struct ucred *, - struct proc *)); extern int union_cn_close __P((struct vnode *, int, struct ucred *, struct proc *)); extern void union_removed_upper __P((struct union_node *un)); extern struct vnode *union_lowervp __P((struct vnode *)); -extern void union_newlower __P((struct union_node *, struct vnode *)); -extern void union_newupper __P((struct union_node *, struct vnode *)); extern void union_newsize __P((struct vnode *, off_t, off_t)); #define MOUNTTOUNIONMOUNT(mp) ((struct union_mount *)((mp)->mnt_data)) diff --git a/sys/miscfs/union/union_subr.c b/sys/miscfs/union/union_subr.c index faf9ec9..8985d87 100644 --- a/sys/miscfs/union/union_subr.c +++ b/sys/miscfs/union/union_subr.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_subr.c 8.20 (Berkeley) 5/20/95 - * $Id: union_subr.c,v 1.20 1997/08/14 03:57:46 kato Exp $ + * $Id: union_subr.c,v 1.21 1997/09/21 04:23:32 dyson Exp $ */ #include @@ -74,9 +74,17 @@ static int union_relookup __P((struct union_mount *um, struct vnode *dvp, struct componentname *cnp, struct componentname *cn, char *path, int pathlen)); -extern void union_updatevp __P((struct union_node *un, +static void union_updatevp __P((struct union_node *un, struct vnode *uppervp, struct vnode *lowervp)); +static void union_newlower __P((struct union_node *, struct vnode *)); +static void union_newupper __P((struct union_node *, struct vnode *)); +static int union_copyfile __P((struct vnode *, struct vnode *, + struct ucred *, struct proc *)); +static int union_vn_create __P((struct vnode **, struct union_node *, + struct proc *)); +static int union_vn_close __P((struct vnode *, int, struct ucred *, + struct proc *)); int union_init() @@ -118,7 +126,7 @@ union_list_unlock(ix) } } -void +static void union_updatevp(un, uppervp, lowervp) struct union_node *un; struct vnode *uppervp; @@ -127,7 +135,7 @@ union_updatevp(un, uppervp, lowervp) int ohash = UNION_HASH(un->un_uppervp, un->un_lowervp); int nhash = UNION_HASH(uppervp, lowervp); int docache = (lowervp != NULLVP || uppervp != NULLVP); - int lhash, hhash, uhash; + int lhash, uhash; /* * Ensure locking is ordered from lower to higher @@ -190,7 +198,7 @@ union_updatevp(un, uppervp, lowervp) union_list_unlock(nhash); } -void +static void union_newlower(un, lowervp) struct union_node *un; struct vnode *lowervp; @@ -199,7 +207,7 @@ union_newlower(un, lowervp) union_updatevp(un, un->un_uppervp, lowervp); } -void +static void union_newupper(un, uppervp) struct union_node *un; struct vnode *uppervp; @@ -568,7 +576,7 @@ union_freevp(vp) * using a sequence of reads and writes. both (fvp) * and (tvp) are locked on entry and exit. */ -int +static int union_copyfile(fvp, tvp, cred, p) struct vnode *fvp; struct vnode *tvp; @@ -840,7 +848,6 @@ union_mkwhiteout(um, dvp, cnp, path) char *path; { int error; - struct vattr va; struct proc *p = cnp->cn_proc; struct vnode *wvp; struct componentname cn; @@ -879,7 +886,7 @@ union_mkwhiteout(um, dvp, cnp, path) * things, and b) it doesn't start at the "right" directory, * whereas relookup is told where to start. */ -int +static int union_vn_create(vpp, un, p) struct vnode **vpp; struct union_node *un; @@ -960,7 +967,7 @@ union_vn_create(vpp, un, p) return (0); } -int +static int union_vn_close(vp, fmode, cred, p) struct vnode *vp; int fmode; diff --git a/sys/miscfs/union/union_vfsops.c b/sys/miscfs/union/union_vfsops.c index 5ace7ce..753afd6 100644 --- a/sys/miscfs/union/union_vfsops.c +++ b/sys/miscfs/union/union_vfsops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95 - * $Id: union_vfsops.c,v 1.20 1997/09/27 13:39:29 kato Exp $ + * $Id: union_vfsops.c,v 1.21 1997/10/12 20:24:57 phk Exp $ */ /* @@ -60,17 +60,17 @@ extern int union_init __P((struct vfsconf *)); extern int union_fhtovp __P((struct mount *mp, struct fid *fidp, struct mbuf *nam, struct vnode **vpp, int *exflagsp, struct ucred **credanonp)); -extern int union_mount __P((struct mount *mp, char *path, caddr_t data, +static int union_mount __P((struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, struct proc *p)); extern int union_quotactl __P((struct mount *mp, int cmd, uid_t uid, caddr_t arg, struct proc *p)); -extern int union_root __P((struct mount *mp, struct vnode **vpp)); -extern int union_start __P((struct mount *mp, int flags, struct proc *p)); -extern int union_statfs __P((struct mount *mp, struct statfs *sbp, +static int union_root __P((struct mount *mp, struct vnode **vpp)); +static int union_start __P((struct mount *mp, int flags, struct proc *p)); +static int union_statfs __P((struct mount *mp, struct statfs *sbp, struct proc *p)); extern int union_sync __P((struct mount *mp, int waitfor, struct ucred *cred, struct proc *p)); -extern int union_unmount __P((struct mount *mp, int mntflags, +static int union_unmount __P((struct mount *mp, int mntflags, struct proc *p)); extern int union_vget __P((struct mount *mp, ino_t ino, struct vnode **vpp)); @@ -79,7 +79,7 @@ extern int union_vptofh __P((struct vnode *vp, struct fid *fhp)); /* * Mount union filesystem */ -int +static int union_mount(mp, path, data, ndp, p) struct mount *mp; char *path; @@ -93,8 +93,6 @@ union_mount(mp, path, data, ndp, p) struct vnode *upperrootvp = NULLVP; struct union_mount *um = 0; struct ucred *cred = 0; - struct ucred *scred; - struct vattr va; char *cp = 0; int len; u_int size; @@ -303,7 +301,7 @@ bad: * on the underlying filesystem(s) will have been called * when that filesystem was mounted. */ -int +static int union_start(mp, flags, p) struct mount *mp; int flags; @@ -316,7 +314,7 @@ union_start(mp, flags, p) /* * Free reference to union layer */ -int +static int union_unmount(mp, mntflags, p) struct mount *mp; int mntflags; @@ -397,7 +395,7 @@ union_unmount(mp, mntflags, p) return (0); } -int +static int union_root(mp, vpp) struct mount *mp; struct vnode **vpp; @@ -454,7 +452,7 @@ union_root(mp, vpp) return (error); } -int +static int union_statfs(mp, sbp, p) struct mount *mp; struct statfs *sbp; @@ -547,7 +545,7 @@ union_statfs(mp, sbp, p) eopnotsupp) #define union_vptofh ((int (*) __P((struct vnode *, struct fid *)))eopnotsupp) -struct vfsops union_vfsops = { +static struct vfsops union_vfsops = { union_mount, union_start, union_unmount, -- cgit v1.1