* afs_readdir_move
* afs_bulkstat_send
* afs_readdir/afs_readdir2(HP)
- * afs_readdir1 - HP and DUX NFS versions
+ * afs_readdir1 - HP NFS version
*
*/
};
#endif /* AFS_SGI_ENV */
-#if defined(AFS_HPUX_ENV) || defined(AFS_OSF_ENV)
+#if defined(AFS_HPUX_ENV)
struct minnfs_direct {
afs_int32 d_off; /* XXX */
afs_uint32 d_fileno;
*/
int
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
afs_readdir(OSI_VC_DECL(avc), struct uio *auio, afs_ucred_t *acred,
int *eofp)
#else
#endif /* AFS_SGI61_ENV */
#endif /* defined(AFS_SGI53_ENV) */
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
/* Not really used by the callee so we ignore it for now */
if (eofp)
*eofp = 0;
} else {
/* nothin to hand over */
}
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
if (eofp)
*eofp = 1; /* Set it properly */
#endif
return code;
}
-#if defined(AFS_HPUX_ENV) || defined(AFS_OSF_ENV)
-#ifdef AFS_OSF_ENV
-int
-afs1_readdir(struct vcache *avc, struct uio *auio, afs_ucred_t *acred,
- int *eofp)
-#else
+#if defined(AFS_HPUX_ENV)
int
afs1_readdir(struct vcache *avc, struct uio *auio, afs_ucred_t *acred)
-#endif
{
struct vrequest treq;
register struct dcache *tdc;
struct DirEntry *ode = 0, *nde = 0;
int o_slen = 0, n_slen = 0;
afs_uint32 us;
-#if defined(AFS_HPUX_ENV) || defined(AFS_OSF_ENV)
/*
- * XXX All the hacks for alloced sdirEntry and inlining of afs_readdir_move instead of calling
- * it is necessary for hpux due to stack problems that seem to occur when coming thru the nfs
+ * XXX All the hacks for alloced sdirEntry and inlining of
+ * afs_readdir_move instead of calling it is necessary for hpux due to
+ * stack problems that seem to occur when coming thru the nfs
* translator side XXX
*/
struct minnfs_direct *sdirEntry = (struct minnfs_direct *)
osi_AllocSmallSpace(sizeof(struct min_direct));
afs_int32 rlen;
-#endif
+
struct afs_fakestat_state fakestate;
AFS_STATCNT(afs_readdir);
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV)
- if (eofp)
- *eofp = 0;
-#endif
if (code = afs_InitReq(&treq, acred)) {
-#ifdef AFS_HPUX_ENV
osi_FreeSmallSpace((char *)sdirEntry);
-#endif
return code;
}
afs_InitFakeStat(&fakestate);
AFS_DISCON_LOCK();
code = afs_EvalFakeStat(&avc, &fakestate, &treq);
if (code) {
-#ifdef AFS_HPUX_ENV
osi_FreeSmallSpace((char *)sdirEntry);
-#endif
AFS_DISCON_UNLOCK();
afs_PutFakeStat(&fakestate);
return code;
}
len = 0;
-#ifdef AFS_HPUX_ENV
auio->uio_fpflags = 0;
-#endif
while (code == 0) {
origOffset = AFS_UIO_OFFSET(auio);
- /* scan for the next interesting entry scan for in-use blob otherwise up point at
- * this blob note that ode, if non-zero, also represents a held dir page */
+ /* scan for the next interesting entry scan for in-use blob
+ * otherwise up point at this blob note that ode, if non-zero,
+ * also represents a held dir page */
if (!(us = BlobScan(tdc, (origOffset >> 5)))
|| !(nde = (struct DirEntry *)afs_dir_GetBlob(tdc, us))) {
/* failed to setup nde, return what we've got, and release ode */
if (len) {
/* something to hand over. */
-#if defined(AFS_HPUX_ENV) || defined(AFS_OSF_ENV)
sdirEntry->d_fileno =
(avc->f.fid.Fid.Volume << 16) + ntohl(ode->fid.vnode);
FIXUPSTUPIDINODE(sdirEntry->d_fileno);
rlen -= minLen;
}
}
-#else
- code =
- afs_readdir_move(ode, avc, auio, o_slen,
- AFS_UIO_RESID(auio), origOffset);
-#endif /* AFS_HPUX_ENV */
AFS_UIO_SETRESID(auio, 0);
} else {
/* nothin to hand over */
}
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV)
- if (eofp)
- *eofp = 1;
-#endif
if (ode)
DRelease(ode, 0);
goto dirend;
/* by here nde is set */
/* Do we have enough user space to carry out our mission? */
-#if defined(AFS_SGI_ENV)
- n_slen = strlen(nde->name) + 1; /* NULL terminate */
-#else
n_slen = strlen(nde->name);
-#endif
if (NDIRSIZ_LEN(n_slen) >= (AFS_UIO_RESID(auio) - len)) {
/* No can do no more now; ya know... at this time */
DRelease(nde, 0); /* can't use this one. */
if (len) {
-#if defined(AFS_HPUX_ENV) || defined(AFS_OSF_ENV)
sdirEntry->d_fileno =
(avc->f.fid.Fid.Volume << 16) + ntohl(ode->fid.vnode);
FIXUPSTUPIDINODE(sdirEntry->d_fileno);
rlen -= minLen;
}
}
-#else
- code =
- afs_readdir_move(ode, avc, auio, o_slen,
- AFS_UIO_RESID(auio), origOffset);
-#endif /* AFS_HPUX_ENV */
/* this next line used to be AFSVFS40 or AIX 3.1, but is really generic */
AFS_UIO_SETOFFSET(auio, origOffset);
AFS_UIO_SETRESID(auio, 0);
* to set up for the next one.
*/
if (len) {
-#if defined(AFS_HPUX_ENV) || defined(AFS_OSF_ENV)
sdirEntry->d_fileno =
(avc->f.fid.Fid.Volume << 16) + ntohl(ode->fid.vnode);
FIXUPSTUPIDINODE(sdirEntry->d_fileno);
rlen -= minLen;
}
}
-#else
- code = afs_readdir_move(ode, avc, auio, o_slen, len, origOffset);
-#endif /* AFS_HPUX_ENV */
}
len = NDIRSIZ_LEN(o_slen = n_slen);
if (ode)
ReleaseReadLock(&avc->lock);
done:
-#if defined(AFS_HPUX_ENV) || defined(AFS_OSF_ENV)
osi_FreeSmallSpace((char *)sdirEntry);
-#endif
AFS_DISCON_UNLOCK();
afs_PutFakeStat(&fakestate);
code = afs_CheckCode(code, &treq, 29);