summaryrefslogtreecommitdiff
path: root/sys/adosfs/adlookup.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-20 15:49:55 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-20 15:49:55 +0000
commit1b4184b3f977830ee35da9a9e38c76f24b7a4999 (patch)
treedbf6332538dd73cb4fd388a54f5f6dc8d792325e /sys/adosfs/adlookup.c
parent09f60acda5a8fc3fa2e690dc8336f0c0b96e5a49 (diff)
Type pedantery.. a lot of it too, more could be done as well. Sync with
NetBSD 970118 too.
Diffstat (limited to 'sys/adosfs/adlookup.c')
-rw-r--r--sys/adosfs/adlookup.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/adosfs/adlookup.c b/sys/adosfs/adlookup.c
index a12f9238a51..b7bc5a26fd9 100644
--- a/sys/adosfs/adlookup.c
+++ b/sys/adosfs/adlookup.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: adlookup.c,v 1.6 1996/08/23 19:10:57 niklas Exp $ */
-/* $NetBSD: adlookup.c,v 1.13.4.1 1996/05/27 09:53:50 is Exp $ */
+/* $OpenBSD: adlookup.c,v 1.7 1997/01/20 15:49:51 niklas Exp $ */
+/* $NetBSD: adlookup.c,v 1.17 1996/10/25 23:13:58 cgd Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -75,8 +75,9 @@ adosfs_lookup(v)
struct vnode *vdp; /* vnode of search dir */
struct anode *adp; /* anode of search dir */
struct ucred *ucp; /* lookup credentials */
- u_long bn, plen, hval, vpid;
- u_char *pelt;
+ u_int32_t plen, hval, vpid;
+ daddr_t bn;
+ char *pelt;
#ifdef ADOSFS_DIAGNOSTIC
advopprint(sp);
@@ -92,7 +93,7 @@ adosfs_lookup(v)
last = flags & ISLASTCN;
lockp = flags & LOCKPARENT;
wantp = flags & (LOCKPARENT | WANTPARENT);
- pelt = (u_char *)cnp->cn_nameptr;
+ pelt = cnp->cn_nameptr;
plen = cnp->cn_namelen;
nocache = 0;
@@ -170,8 +171,8 @@ adosfs_lookup(v)
*
*/
VOP_UNLOCK(vdp); /* race */
- if ((error = VFS_VGET(vdp->v_mount,
- (ino_t)adp->pblock, vpp)) != 0)
+ if ((error = VFS_VGET(vdp->v_mount, ABLKTOINO(adp->pblock),
+ vpp)) != 0)
VOP_LOCK(vdp);
else if (last && lockp && (error = VOP_LOCK(vdp)))
vput(*vpp);
@@ -191,7 +192,8 @@ adosfs_lookup(v)
bn = adp->tab[hval];
i = min(adp->tabi[hval], 0);
while (bn != 0) {
- if ((error = VFS_VGET(vdp->v_mount, (ino_t)bn, vpp)) != 0) {
+ if ((error = VFS_VGET(vdp->v_mount, ABLKTOINO(bn), vpp)) !=
+ 0) {
#ifdef ADOSFS_DIAGNOSTIC
printf("[aget] %d)", error);
#endif