char *cpos, *volnamep;
char type, *buf;
afs_int32 prefetch; /* 1=>None 2=>RO 3=>BK */
- afs_int32 mtptCell, assocCell, hac = 0;
+ afs_int32 mtptCell, assocCell = 0, hac = 0;
afs_int32 samecell, roname, len;
AFS_STATCNT(EvalMountPoint);
}
void
-Check_AtSys(register struct vcache *avc, char *aname,
+Check_AtSys(register struct vcache *avc, const char *aname,
struct sysname_info *state, struct vrequest *areq)
{
int num = 0;
state->offset = -1;
state->allocked = 0;
state->index = 0;
- state->name = aname;
+ state->name = (char *)aname;
}
}
}
afs_PutUser(au, 0);
}
- if (++(state->index) >= num || !(*sysnamelist)[state->index])
+ if (++(state->index) >= num || !(*sysnamelist)[(unsigned int)state->index])
return 0; /* end of list */
}
- strcpy(state->name + state->offset, (*sysnamelist)[state->index]);
+ strcpy(state->name + state->offset, (*sysnamelist)[(unsigned int)state->index]);
return 1;
}
-#if (defined(AFS_SGI62_ENV) || defined(AFS_SUN57_64BIT_ENV))
-extern int BlobScan(ino64_t * afile, afs_int32 ablob);
-#else
-#if defined(AFS_HPUX1123_ENV)
-/* DEE should use the new afs_inode_t for all */
-extern int BlobScan(ino_t * afile, afs_int32 ablob);
-#else
-#if defined AFS_LINUX_64BIT_KERNEL
-extern int BlobScan(long *afile, afs_int32 ablob);
-#else
-extern int BlobScan(afs_int32 * afile, afs_int32 ablob);
-#endif
-#endif
-#endif
-
+extern int BlobScan(struct dcache * afile, afs_int32 ablob);
/* called with an unlocked directory and directory cookie. Areqp
* describes who is making the call.
struct afs_q *tq; /* temp queue variable */
AFSCBFids fidParm; /* file ID parm for bulk stat */
AFSBulkStats statParm; /* stat info parm for bulk stat */
- int fidIndex; /* which file were stating */
- struct conn *tcp; /* conn for call */
+ int fidIndex = 0; /* which file were stating */
+ struct conn *tcp = 0; /* conn for call */
AFSCBs cbParm; /* callback parm for bulk stat */
struct server *hostp = 0; /* host we got callback from */
long startTime; /* time we started the call,
* for callback expiration base
*/
- afs_size_t statSeqNo; /* Valued of file size to detect races */
+ afs_size_t statSeqNo = 0; /* Valued of file size to detect races */
int code; /* error code */
long newIndex; /* new index in the dir */
struct DirEntry *dirEntryp; /* dir entry we are examining */
long volStates; /* flags from vol structure */
struct volume *volp = 0; /* volume ptr */
struct VenusFid dotdot;
- int flagIndex; /* First file with bulk fetch flag set */
+ int flagIndex = 0; /* First file with bulk fetch flag set */
int inlinebulk = 0; /* Did we use InlineBulk RPC or not? */
XSTATS_DECLS;
/* first compute some basic parameters. We dont want to prefetch more
tagain:
code = afs_VerifyVCache(adp, areqp);
if (code)
- goto done;
+ goto done2;
dcp = afs_GetDCache(adp, (afs_size_t) 0, areqp, &temp, &temp, 1);
if (!dcp) {
code = ENOENT;
- goto done;
+ goto done2;
}
/* lock the directory cache entry */
/* look for first safe entry to examine in the directory. BlobScan
* looks for a the 1st allocated dir after the dirCookie slot.
*/
- newIndex = BlobScan(&dcp->f.inode, (dirCookie >> 5));
+ newIndex = BlobScan(dcp, (dirCookie >> 5));
if (newIndex == 0)
break;
/* get a ptr to the dir entry */
dirEntryp =
- (struct DirEntry *)afs_dir_GetBlob(&dcp->f.inode, newIndex);
+ (struct DirEntry *)afs_dir_GetBlob(dcp, newIndex);
if (!dirEntryp)
break;
} else {
code = 0;
}
+ done2:
osi_FreeLargeSpace(statMemp);
osi_FreeLargeSpace(cbfMemp);
return code;
static int AFSDOBULK = 1;
int
-#ifdef AFS_OSF_ENV
-afs_lookup(adp, ndp)
- struct vcache *adp;
- struct nameidata *ndp;
-{
- char aname[MAXNAMLEN + 1]; /* XXX */
- struct vcache **avcp = (struct vcache **)&(ndp->ni_vp);
- struct ucred *acred = ndp->ni_cred;
- int wantparent = ndp->ni_nameiop & WANTPARENT;
- int opflag = ndp->ni_nameiop & OPFLAG;
-#else /* AFS_OSF_ENV */
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
-afs_lookup(OSI_VC_ARG(adp), aname, avcp, pnp, flags, rdir, acred)
- struct pathname *pnp;
- int flags;
- struct vnode *rdir;
+#ifdef AFS_OSF_ENV
+afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, struct AFS_UCRED *acred, int opflag, int wantparent)
+#elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
+afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, struct pathname *pnp, int flags, struct vnode *rdir, struct AFS_UCRED *acred)
+#elif defined(UKERNEL)
+afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, struct AFS_UCRED *acred, int flags)
#else
-#if defined(UKERNEL)
-afs_lookup(adp, aname, avcp, acred, flags)
- int flags;
-#else
-afs_lookup(adp, aname, avcp, acred)
-#endif /* UKERNEL */
-#endif /* SUN5 || SGI */
- OSI_VC_DECL(adp);
- struct vcache **avcp;
- char *aname;
- struct AFS_UCRED *acred;
-{
+afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, struct AFS_UCRED *acred)
#endif
+{
struct vrequest treq;
char *tname = NULL;
register struct vcache *tvc = 0;
#ifdef AFS_OSF_ENV
ndp->ni_dvp = AFSTOV(adp);
- memcpy(aname, ndp->ni_ptr, ndp->ni_namelen);
- aname[ndp->ni_namelen] = '\0';
#endif /* AFS_OSF_ENV */
#if defined(AFS_DARWIN_ENV)
/* Check for read access as well. We need read access in order to
* stat files, but not to stat subdirectories. */
- if (!afs_AccessOK(adp, PRSFS_LOOKUP, &treq, CHECK_MODE_BITS))
+ if (!afs_AccessOK(adp, PRSFS_READ, &treq, CHECK_MODE_BITS))
no_read_access = 1;
/* special case lookup of ".". Can we check for it sooner in this code,
}
#ifdef AFS_LINUX22_ENV
if (tvc->mvstat == 2) { /* we don't trust the dnlc for root vcaches */
- AFS_RELE(tvc);
+ AFS_RELE(AFSTOV(tvc));
*avcp = 0;
} else {
code = 0;
{ /* sub-block just to reduce stack usage */
register struct dcache *tdc;
afs_size_t dirOffset, dirLen;
- ino_t theDir;
struct VenusFid tfid;
/* now we have to lookup the next fid */
/* lookup the name in the appropriate dir, and return a cache entry
* on the resulting fid */
- theDir = tdc->f.inode;
code =
- afs_dir_LookupOffset(&theDir, sysState.name, &tfid.Fid,
+ afs_dir_LookupOffset(tdc, sysState.name, &tfid.Fid,
&dirCookie);
/* If the first lookup doesn't succeed, maybe it's got @sys in the name */
while (code == ENOENT && Next_AtSys(adp, &treq, &sysState))
code =
- afs_dir_LookupOffset(&theDir, sysState.name, &tfid.Fid,
+ afs_dir_LookupOffset(tdc, sysState.name, &tfid.Fid,
&dirCookie);
tname = sysState.name;