dread-do-validation-20041012
[openafs.git] / src / afs / VNOPS / afs_vnop_readdir.c
index e1e1944..d1d0330 100644 (file)
@@ -66,18 +66,8 @@ extern struct DirEntry *afs_dir_GetBlob();
     BlobScan is used by the Linux port in a separate file, so it should not
     become static.
 */
-#if defined(AFS_SGI62_ENV) || defined(AFS_SUN57_64BIT_ENV)
 int
-BlobScan(ino64_t * afile, afs_int32 ablob)
-#else
-#ifdef AFS_LINUX_64BIT_KERNEL
-int
-BlobScan(long *afile, afs_int32 ablob)
-#else
-int
-BlobScan(afs_int32 * afile, afs_int32 ablob)
-#endif
-#endif
+BlobScan(struct fcache * afile, afs_int32 ablob)
 {
     register afs_int32 relativeBlob;
     afs_int32 pageBlob;
@@ -166,12 +156,11 @@ struct min_direct {               /* miniature direct structure */
 #else
 #if defined(AFS_SUN_ENV) || defined(AFS_AIX32_ENV)
     afs_int32 d_off;
-    afs_uint32 d_fileno;
 #endif
 #if     defined(AFS_HPUX100_ENV)
     unsigned long long d_off;
-    afs_uint32 d_fileno;
 #endif
+    afs_uint32 d_fileno;
     u_short d_reclen;
     u_short d_namlen;
 #endif
@@ -288,6 +277,8 @@ afs_readdir_type(avc, ade)
 #define AFS_MOVE_UNLOCK()
 #endif
 char bufofzeros[64];           /* gotta fill with something */
+
+int
 afs_readdir_move(de, vc, auio, slen, rlen, off)
      struct DirEntry *de;
      struct vcache *vc;
@@ -491,6 +482,7 @@ afs_bulkstat_send(avc, req)
  * It has to do with 'offset' (seek locations).
 */
 
+int
 #if    defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 afs_readdir(OSI_VC_ARG(avc), auio, acred, eofp)
      int *eofp;
@@ -501,7 +493,7 @@ afs_readdir2(OSI_VC_ARG(avc), auio, acred)
 afs_readdir(OSI_VC_ARG(avc), auio, acred)
 #endif
 #endif
-    OSI_VC_DECL(avc);
+     OSI_VC_DECL(avc);
      struct uio *auio;
      struct AFS_UCRED *acred;
 {
@@ -517,13 +509,13 @@ afs_readdir(OSI_VC_ARG(avc), auio, acred)
 #if defined(AFS_SGI53_ENV)
     afs_int32 use64BitDirent, dirsiz;
 #endif /* defined(AFS_SGI53_ENV) */
-    OSI_VC_CONVERT(avc)
+    OSI_VC_CONVERT(avc);
 #ifdef AFS_HPUX_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
-        * translator side XXX
-        */
+    /*
+     * 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 min_direct *sdirEntry =
        (struct min_direct *)osi_AllocSmallSpace(sizeof(struct min_direct));
     afs_int32 rlen;
@@ -649,8 +641,8 @@ afs_readdir(OSI_VC_ARG(avc), auio, acred)
        origOffset = auio->afsio_offset;
        /* 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->f.inode, (origOffset >> 5)))
-           || !(nde = (struct DirEntry *)afs_dir_GetBlob(&tdc->f.inode, us))) {
+       if (!(us = BlobScan(&tdc->f, (origOffset >> 5)))
+           || !(nde = (struct DirEntry *)afs_dir_GetBlob(&tdc->f, us))) {
            /* failed to setup nde, return what we've got, and release ode */
            if (len) {
                /* something to hand over. */
@@ -940,8 +932,8 @@ afs1_readdir(avc, auio, acred)
 
        /* 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->f.inode, (origOffset >> 5)))
-           || !(nde = (struct DirEntry *)afs_dir_GetBlob(&tdc->f.inode, us))) {
+       if (!(us = BlobScan(&tdc->f, (origOffset >> 5)))
+           || !(nde = (struct DirEntry *)afs_dir_GetBlob(&tdc->f, us))) {
            /* failed to setup nde, return what we've got, and release ode */
            if (len) {
                /* something to hand over. */