aboutsummaryrefslogtreecommitdiff
path: root/sys/miscfs/umapfs
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1994-10-10 07:55:48 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1994-10-10 07:55:48 +0000
commit3a773ad0b564e224a380b188f005e6582fabaf34 (patch)
tree7554aaa733a10acfa4773a846448e6f66d2d6ee3 /sys/miscfs/umapfs
parent76d121f2b4327918e0b80ce497282fa435820771 (diff)
downloadsrc-3a773ad0b564e224a380b188f005e6582fabaf34.tar.gz
src-3a773ad0b564e224a380b188f005e6582fabaf34.zip
Notes
Diffstat (limited to 'sys/miscfs/umapfs')
-rw-r--r--sys/miscfs/umapfs/umap_subr.c14
-rw-r--r--sys/miscfs/umapfs/umap_vfsops.c11
-rw-r--r--sys/miscfs/umapfs/umap_vnops.c27
3 files changed, 30 insertions, 22 deletions
diff --git a/sys/miscfs/umapfs/umap_subr.c b/sys/miscfs/umapfs/umap_subr.c
index b640891a410c..4b2aad4ba01a 100644
--- a/sys/miscfs/umapfs/umap_subr.c
+++ b/sys/miscfs/umapfs/umap_subr.c
@@ -35,7 +35,7 @@
*
* @(#)umap_subr.c 8.6 (Berkeley) 1/26/94
*
- * $Id: lofs_subr.c, v 1.11 1992/05/30 10:05:43 jsp Exp jsp $
+ * $Id: umap_subr.c,v 1.2 1994/05/25 09:09:07 rgrimes Exp $
*/
#include <sys/param.h>
@@ -212,7 +212,8 @@ umap_node_alloc(mp, lowervp, vpp)
struct vnode *othervp, *vp;
int error;
- if (error = getnewvnode(VT_UMAP, mp, umap_vnodeop_p, vpp))
+ error = getnewvnode(VT_UMAP, mp, umap_vnodeop_p, vpp);
+ if (error)
return (error);
vp = *vpp;
@@ -227,7 +228,8 @@ umap_node_alloc(mp, lowervp, vpp)
* check to see if someone else has beaten us to it.
* (We could have slept in MALLOC.)
*/
- if (othervp = umap_node_find(lowervp)) {
+ othervp = umap_node_find(lowervp);
+ if (othervp) {
FREE(xp, M_TEMP);
vp->v_type = VBAD; /* node is discarded */
vp->v_usecount = 0; /* XXX */
@@ -254,7 +256,8 @@ umap_node_create(mp, targetvp, newvpp)
{
struct vnode *aliasvp;
- if (aliasvp = umap_node_find(mp, targetvp)) {
+ aliasvp = umap_node_find(mp, targetvp);
+ if (aliasvp) {
/*
* Take another reference to the alias vnode
*/
@@ -274,7 +277,8 @@ umap_node_create(mp, targetvp, newvpp)
/*
* Make new vnode reference the umap_node.
*/
- if (error = umap_node_alloc(mp, targetvp, &aliasvp))
+ error = umap_node_alloc(mp, targetvp, &aliasvp);
+ if (error)
return (error);
/*
diff --git a/sys/miscfs/umapfs/umap_vfsops.c b/sys/miscfs/umapfs/umap_vfsops.c
index c12bb8c96fac..e0baf463a59b 100644
--- a/sys/miscfs/umapfs/umap_vfsops.c
+++ b/sys/miscfs/umapfs/umap_vfsops.c
@@ -35,7 +35,7 @@
*
* @(#)umap_vfsops.c 8.3 (Berkeley) 1/21/94
*
- * $Id: umap_vfsops.c,v 1.3 1994/09/21 03:47:11 wollman Exp $
+ * $Id: umap_vfsops.c,v 1.4 1994/09/22 19:38:19 wollman Exp $
*/
/*
@@ -87,7 +87,8 @@ umapfs_mount(mp, path, data, ndp, p)
/*
* Get argument
*/
- if (error = copyin(data, (caddr_t)&args, sizeof(struct umap_args)))
+ error = copyin(data, (caddr_t)&args, sizeof(struct umap_args));
+ if (error)
return (error);
/*
@@ -95,7 +96,8 @@ umapfs_mount(mp, path, data, ndp, p)
*/
NDINIT(ndp, LOOKUP, FOLLOW|WANTPARENT|LOCKLEAF,
UIO_USERSPACE, args.target, p);
- if (error = namei(ndp))
+ error = namei(ndp);
+ if (error)
return (error);
/*
@@ -250,7 +252,8 @@ umapfs_unmount(mp, mntflags, p)
#endif
if (umapm_rootvp->v_usecount > 1)
return (EBUSY);
- if (error = vflush(mp, umapm_rootvp, flags))
+ error = vflush(mp, umapm_rootvp, flags);
+ if (error)
return (error);
#ifdef UMAPFS_DIAGNOSTIC
diff --git a/sys/miscfs/umapfs/umap_vnops.c b/sys/miscfs/umapfs/umap_vnops.c
index fa692922b4b6..ddbe4995cdb8 100644
--- a/sys/miscfs/umapfs/umap_vnops.c
+++ b/sys/miscfs/umapfs/umap_vnops.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)umap_vnops.c 8.3 (Berkeley) 1/5/94
- * $Id: umap_vnops.c,v 1.5 1994/09/21 03:47:12 wollman Exp $
+ * $Id: umap_vnops.c,v 1.6 1994/09/21 23:22:43 wollman Exp $
*/
/*
@@ -141,7 +141,7 @@ umap_bypass(ap)
credp = *credpp;
if (umap_bug_bypass && credp->cr_uid != 0)
- printf("umap_bypass: user was %d, group %d\n",
+ printf("umap_bypass: user was %ld, group %ld\n",
credp->cr_uid, credp->cr_gid);
/* Map all ids in the credential structure. */
@@ -149,7 +149,7 @@ umap_bypass(ap)
umap_mapids(vp1->v_mount, credp);
if (umap_bug_bypass && credp->cr_uid != 0)
- printf("umap_bypass: user now %d, group %d\n",
+ printf("umap_bypass: user now %ld, group %ld\n",
credp->cr_uid, credp->cr_gid);
}
@@ -167,7 +167,7 @@ umap_bypass(ap)
compcredp = (*compnamepp)->cn_cred = crdup(savecompcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_bypass: component credit user was %d, group %d\n",
+ printf("umap_bypass: component credit user was %ld, group %ld\n",
compcredp->cr_uid, compcredp->cr_gid);
/* Map all ids in the credential structure. */
@@ -175,7 +175,7 @@ umap_bypass(ap)
umap_mapids(vp1->v_mount, compcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_bypass: component credit user now %d, group %d\n",
+ printf("umap_bypass: component credit user now %ld, group %ld\n",
compcredp->cr_uid, compcredp->cr_gid);
}
@@ -222,25 +222,25 @@ umap_bypass(ap)
*/
if (descp->vdesc_cred_offset != VDESC_NO_OFFSET) {
if (umap_bug_bypass && credp && credp->cr_uid != 0)
- printf("umap_bypass: returning-user was %d\n",
+ printf("umap_bypass: returning-user was %ld\n",
credp->cr_uid);
crfree(credp);
(*credpp) = savecredp;
if (umap_bug_bypass && credpp && (*credpp)->cr_uid != 0)
- printf("umap_bypass: returning-user now %d\n\n",
+ printf("umap_bypass: returning-user now %ld\n\n",
(*credpp)->cr_uid);
}
if (descp->vdesc_componentname_offset != VDESC_NO_OFFSET) {
if (umap_bug_bypass && compcredp && compcredp->cr_uid != 0)
- printf("umap_bypass: returning-component-user was %d\n",
+ printf("umap_bypass: returning-component-user was %ld\n",
compcredp->cr_uid);
crfree(compcredp);
(*compnamepp)->cn_cred = savecompcredp;
if (umap_bug_bypass && credpp && (*credpp)->cr_uid != 0)
- printf("umap_bypass: returning-component-user now %d\n",
+ printf("umap_bypass: returning-component-user now %ld\n",
compcredp->cr_uid);
}
@@ -266,7 +266,8 @@ umap_getattr(ap)
struct vnode **vp1p;
struct vnodeop_desc *descp = ap->a_desc;
- if (error = umap_bypass(ap))
+ error = umap_bypass(ap);
+ if (error)
return (error);
/* Requires that arguments be restored. */
ap->a_vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0];
@@ -407,7 +408,7 @@ umap_print(ap)
} */ *ap;
{
struct vnode *vp = ap->a_vp;
- printf("\ttag VT_UMAPFS, vp=%x, lowervp=%x\n", vp, UMAPVPTOLOWERVP(vp));
+ printf("\ttag VT_UMAPFS, vp=%p, lowervp=%p\n", vp, UMAPVPTOLOWERVP(vp));
return (0);
}
@@ -441,7 +442,7 @@ umap_rename(ap)
compcredp = compnamep->cn_cred = crdup(savecompcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_rename: rename component credit user was %d, group %d\n",
+ printf("umap_rename: rename component credit user was %ld, group %ld\n",
compcredp->cr_uid, compcredp->cr_gid);
/* Map all ids in the credential structure. */
@@ -449,7 +450,7 @@ umap_rename(ap)
umap_mapids(vp->v_mount, compcredp);
if (umap_bug_bypass && compcredp->cr_uid != 0)
- printf("umap_rename: rename component credit user now %d, group %d\n",
+ printf("umap_rename: rename component credit user now %ld, group %ld\n",
compcredp->cr_uid, compcredp->cr_gid);
error = umap_bypass(ap);