From: Chris Pressey Date: Tue, 18 May 2004 16:57:01 +0000 (+0000) Subject: Style(9) cleanup to src/sys/vfs, stage 20/21: umapfs. X-Git-Tag: v2.0.1~11284 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/0af0c3d94cbb32166b14747193c1a24c466ae453 Style(9) cleanup to src/sys/vfs, stage 20/21: umapfs. - Convert K&R-style function definitions to ANSI style. Submitted-by: Andre Nathan Additional-reformatting-by: cpressey --- diff --git a/sys/vfs/umapfs/umap_subr.c b/sys/vfs/umapfs/umap_subr.c index 78000b7f37..ecbc66cb08 100644 --- a/sys/vfs/umapfs/umap_subr.c +++ b/sys/vfs/umapfs/umap_subr.c @@ -36,7 +36,7 @@ * @(#)umap_subr.c 8.9 (Berkeley) 5/14/95 * * $FreeBSD: src/sys/miscfs/umapfs/umap_subr.c,v 1.19 1999/09/04 11:51:41 bde Exp $ - * $DragonFly: src/sys/vfs/umapfs/Attic/umap_subr.c,v 1.7 2004/04/24 04:32:05 drhodus Exp $ + * $DragonFly: src/sys/vfs/umapfs/Attic/umap_subr.c,v 1.8 2004/05/18 16:57:01 cpressey Exp $ */ #include @@ -74,10 +74,8 @@ static struct vnode * * Initialise cache headers */ int -umapfs_init(vfsp) - struct vfsconf *vfsp; +umapfs_init(struct vfsconf *vfsp) { - #ifdef DEBUG printf("umapfs_init\n"); /* printed during system boot */ #endif @@ -90,10 +88,7 @@ umapfs_init(vfsp) * find a user or group id in a map. */ static u_long -umap_findid(id, map, nentries) - u_long id; - u_long map[][2]; - int nentries; +umap_findid(u_long id, u_long map[][2], int nentries) { int i; @@ -106,7 +101,6 @@ umap_findid(id, map, nentries) return (map[i][1]); else return (-1); - } /* @@ -114,10 +108,7 @@ umap_findid(id, map, nentries) * find a user or group id in a map, in reverse. */ u_long -umap_reverse_findid(id, map, nentries) - u_long id; - u_long map[][2]; - int nentries; +umap_reverse_findid(u_long id, u_long map[][2], int nentries) { int i; @@ -130,16 +121,13 @@ umap_reverse_findid(id, map, nentries) return (map[i][0]); else return (-1); - } /* * Return alias for target vnode if already exists, else 0. */ static struct vnode * -umap_node_find(mp, targetvp) - struct mount *mp; - struct vnode *targetvp; +umap_node_find(struct mount *mp, struct vnode *targetvp) { struct thread *td = curthread; /* XXX */ struct umap_node_hashhead *hd; @@ -192,10 +180,7 @@ loop: * Maintain a reference to (targetvp). */ static int -umap_node_alloc(mp, lowervp, vpp) - struct mount *mp; - struct vnode *lowervp; - struct vnode **vpp; +umap_node_alloc(struct mount *mp, struct vnode *lowervp, struct vnode **vpp) { struct umap_node_hashhead *hd; struct umap_node *xp; @@ -249,10 +234,8 @@ umap_node_alloc(mp, lowervp, vpp) * contains a reference to the target vnode. */ int -umap_node_create(mp, targetvp, newvpp) - struct mount *mp; - struct vnode *targetvp; - struct vnode **newvpp; +umap_node_create(struct mount *mp, struct vnode *targetvp, + struct vnode **newvpp) { struct vnode *aliasvp; @@ -300,10 +283,7 @@ umap_node_create(mp, targetvp, newvpp) #ifdef DIAGNOSTIC int umap_checkvp_barrier = 1; struct vnode * -umap_checkvp(vp, fil, lno) - struct vnode *vp; - char *fil; - int lno; +umap_checkvp(struct vnode *vp, char *fil, int lno) { struct umap_node *a = VTOUMAP(vp); #if 0 @@ -351,9 +331,7 @@ umap_checkvp(vp, fil, lno) /* umap_mapids maps all of the ids in a credential, both user and group. */ void -umap_mapids(v_mount, credp) - struct mount *v_mount; - struct ucred *credp; +umap_mapids(struct mount *v_mount, struct ucred *credp) { int i; uid_t uid; diff --git a/sys/vfs/umapfs/umap_vnops.c b/sys/vfs/umapfs/umap_vnops.c index 5d0fc742db..e02b1db078 100644 --- a/sys/vfs/umapfs/umap_vnops.c +++ b/sys/vfs/umapfs/umap_vnops.c @@ -35,7 +35,7 @@ * * @(#)umap_vnops.c 8.6 (Berkeley) 5/22/95 * $FreeBSD: src/sys/miscfs/umapfs/umap_vnops.c,v 1.30 1999/08/30 07:08:04 bde Exp $ - * $DragonFly: src/sys/vfs/umapfs/Attic/umap_vnops.c,v 1.7 2004/04/24 04:32:05 drhodus Exp $ + * $DragonFly: src/sys/vfs/umapfs/Attic/umap_vnops.c,v 1.8 2004/05/18 16:57:01 cpressey Exp $ */ /* @@ -71,13 +71,11 @@ static int umap_unlock (struct vop_unlock_args *ap); /* * This is the 10-Apr-92 bypass routine. * See null_vnops.c:null_bypass for more details. + * + * umap_bypass(struct vnodeop_desc *a_desc, ...) */ static int -umap_bypass(ap) - struct vop_generic_args /* { - struct vnodeop_desc *a_desc; - - } */ *ap; +umap_bypass(struct vop_generic_args *ap) { struct ucred **credpp = 0, *credp = 0; struct ucred *savecredp = 0, *savecompcredp = 0; @@ -277,15 +275,12 @@ umap_bypass(ap) /* * We handle getattr to change the fsid. + * + * umap_getattr(struct vnode *a_vp, struct vattr *a_vap, struct ucred *a_cred, + * struct thread *a_td) */ static int -umap_getattr(ap) - struct vop_getattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +umap_getattr(struct vop_getattr_args *ap) { short uid, gid; int error, tmpid, nentries, gnentries; @@ -354,17 +349,13 @@ umap_getattr(ap) * We need to process our own vnode lock and then clear the * interlock flag as it applies only to our vnode, not the * vnodes below us on the stack. + * + * umap_lock(struct vnode *a_vp, lwkt_tokref_t a_vlock, int a_flags, + * struct thread *a_td) */ static int -umap_lock(ap) - struct vop_lock_args /* { - struct vnode *a_vp; - lwkt_tokref_t a_vlock; - int a_flags; - struct thread *a_td; - } */ *ap; +umap_lock(struct vop_lock_args *ap) { - vop_nolock(ap); if ((ap->a_flags & LK_TYPE_MASK) == LK_DRAIN) return (0); @@ -376,26 +367,22 @@ umap_lock(ap) * We need to process our own vnode unlock and then clear the * interlock flag as it applies only to our vnode, not the * vnodes below us on the stack. + * + * umap_unlock(struct vnode *a_vp, int a_flags, struct thread *a_td) */ int -umap_unlock(ap) - struct vop_unlock_args /* { - struct vnode *a_vp; - int a_flags; - struct thread *a_td; - } */ *ap; +umap_unlock(struct vop_unlock_args *ap) { vop_nounlock(ap); ap->a_flags &= ~LK_INTERLOCK; return (null_bypass((struct vop_generic_args *)ap)); } +/* + * umap_inactive(struct vnode *a_vp, struct thread *a_td) + */ static int -umap_inactive(ap) - struct vop_inactive_args /* { - struct vnode *a_vp; - struct thread *a_td; - } */ *ap; +umap_inactive(struct vop_inactive_args *ap) { struct vnode *vp = ap->a_vp; struct umap_node *xp = VTOUMAP(vp); @@ -412,11 +399,11 @@ umap_inactive(ap) return (0); } +/* + * umap_reclaim(struct vnode *a_vp) + */ static int -umap_reclaim(ap) - struct vop_reclaim_args /* { - struct vnode *a_vp; - } */ *ap; +umap_reclaim(struct vop_reclaim_args *ap) { struct vnode *vp = ap->a_vp; struct umap_node *xp = VTOUMAP(vp); @@ -431,27 +418,24 @@ umap_reclaim(ap) return (0); } +/* + * umap_print(struct vop_print_args *ap) + */ static int -umap_print(ap) - struct vop_print_args /* { - struct vnode *a_vp; - } */ *ap; +umap_print(struct vop_print_args *ap) { struct vnode *vp = ap->a_vp; printf("\ttag VT_UMAPFS, vp=%p, lowervp=%p\n", vp, UMAPVPTOLOWERVP(vp)); return (0); } +/* + * umap_rename(struct vnode *a_fdvp, struct vnode *a_fvp, + * struct componentname *a_fcnp, struct vnode *a_tdvp, + * struct vnode *a_tvp, struct componentname *a_tcnp) + */ static int -umap_rename(ap) - struct vop_rename_args /* { - struct vnode *a_fdvp; - struct vnode *a_fvp; - struct componentname *a_fcnp; - struct vnode *a_tdvp; - struct vnode *a_tvp; - struct componentname *a_tcnp; - } */ *ap; +umap_rename(struct vop_rename_args *ap) { int error; struct componentname *compnamep;