openbsd-20021011
authorJim Rees <rees@umich.edu>
Fri, 11 Oct 2002 22:43:14 +0000 (22:43 +0000)
committerJim Rees <rees@umich.edu>
Fri, 11 Oct 2002 22:43:14 +0000 (22:43 +0000)
More OpenBSD merge.

src/afs/VNOPS/afs_vnop_attrs.c
src/afs/VNOPS/afs_vnop_flock.c
src/afs/VNOPS/afs_vnop_lookup.c
src/afs/VNOPS/afs_vnop_read.c
src/afs/VNOPS/afs_vnop_remove.c
src/afs/VNOPS/afs_vnop_strategy.c
src/afs/VNOPS/afs_vnop_write.c
src/afs/exporter.h
src/config/param.i386_obsd31.h
src/libafs/MakefileProto.OBSD.in
src/rx/rx_kcommon.c

index 98c8e86..be797a8 100644 (file)
@@ -103,7 +103,7 @@ int afs_CopyOutAttrs(register struct vcache *avc, register struct vattr *attrs)
      * anyway, so the difference between 512K and 1000000 shouldn't matter
      * much, and "&" is a lot faster than "%".
      */
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
     /* nfs on these systems puts an 0 in nsec and stores the nfs usec (aka 
        dataversion) in va_gen */
 
@@ -117,7 +117,7 @@ int afs_CopyOutAttrs(register struct vcache *avc, register struct vattr *attrs)
     attrs->va_atime.tv_nsec = attrs->va_mtime.tv_nsec =
        attrs->va_ctime.tv_nsec =
            (hgetlo(avc->m.DataVersion) & 0x7ffff) * 1000;
-#if defined(AFS_AIX41_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_AIX41_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
     attrs->va_blocksize = PAGESIZE;            /* XXX Was 8192 XXX */
 #else
     attrs->va_blksize = PAGESIZE;              /* XXX Was 8192 XXX */
@@ -154,7 +154,7 @@ int afs_CopyOutAttrs(register struct vcache *avc, register struct vattr *attrs)
     attrs->va_flags = 0;
 #endif /* AFS_OSF_ENV || AFS_DARWIN_ENV */
 
-#if !defined(AFS_OSF_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_OSF_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
 #if !defined(AFS_HPUX_ENV)
 #ifdef AFS_SUN5_ENV
     attrs->va_nblocks = (attrs->va_size? ((attrs->va_size + 1023)>>10) << 1 : 0);
@@ -168,7 +168,7 @@ int afs_CopyOutAttrs(register struct vcache *avc, register struct vattr *attrs)
 #else /* !defined(AFS_HPUX_ENV) */
     attrs->va_blocks = (attrs->va_size? ((attrs->va_size + 1023)>>10) : 0);
 #endif /* !defined(AFS_HPUX_ENV) */
-#else  /* ! AFS_OSF_ENV && !AFS_FBSD_ENV */
+#else  /* ! AFS_OSF_ENV && !AFS_XBSD_ENV */
     attrs->va_bytes = (attrs->va_size? (attrs->va_size + 1023) : 1024);
 #ifdef va_bytes_rsv
     attrs->va_bytes_rsv = -1;
@@ -286,7 +286,7 @@ int afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs, struct AFS_UCRED *acred)
                  return EACCES;
              }
              if (avc->mvstat == 2) {
-#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
                  attrs->va_mtime.tv_nsec += ((++avc->xlatordv) * 1000); 
 #else
                  attrs->va_mtime.tv_usec += ++avc->xlatordv; 
@@ -412,7 +412,7 @@ int afs_VAttrToAS(register struct vcache *avc, register struct vattr *av,
 #endif
        mask |= AFS_SETMODTIME;
 #ifndef        AFS_SGI_ENV
-#if    defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if    defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
        if (av->va_mtime.tv_nsec == -1)
 #else
        if (av->va_mtime.tv_usec == -1)
index b52953c..bbec38f 100644 (file)
@@ -38,7 +38,7 @@ void lockIdSet(struct AFS_FLOCK *flock, struct SimpleLocks *slp, int clid)
 #if    defined(AFS_SUN5_ENV)
     register proc_t *procp = ttoproc(curthread);    
 #else
-#if !defined(AFS_AIX41_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_SGI65_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_AIX41_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_SGI65_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
 #ifdef AFS_SGI_ENV
     struct proc *procp = OSI_GET_CURRENT_PROCP();
 #else
@@ -78,7 +78,7 @@ void lockIdSet(struct AFS_FLOCK *flock, struct SimpleLocks *slp, int clid)
 #endif
         slp->pid = clid;
 #else
-#if    defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if    defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
        slp->pid = clid;
 #else
 #if defined(AFS_LINUX20_ENV) || defined(AFS_HPUX_ENV)
@@ -117,7 +117,7 @@ void lockIdSet(struct AFS_FLOCK *flock, struct SimpleLocks *slp, int clid)
 #endif
         flock->l_pid = clid;
 #else
-#if    defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if    defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
        flock->l_pid = clid;
 #else
 #if defined(AFS_LINUX20_ENV) || defined(AFS_HPUX_ENV)
@@ -150,7 +150,7 @@ static int lockIdcmp2(struct AFS_FLOCK *flock1, struct vcache *vp,
 #if    defined(AFS_SUN5_ENV)
     register proc_t *procp = ttoproc(curthread);    
 #else
-#if !defined(AFS_AIX41_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_SGI65_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_AIX41_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_SGI65_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
 #ifdef AFS_SGI64_ENV
     struct proc *procp = curprocp;
 #else /* AFS_SGI64_ENV */
@@ -169,7 +169,7 @@ static int lockIdcmp2(struct AFS_FLOCK *flock1, struct vcache *vp,
 #if defined(AFS_AIX41_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_HPUX_ENV)
          (!onlymine && (flock1->l_pid == getppid()))
 #else
-#if defined(AFS_SGI65_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_SGI65_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
           /* XXX check this. used to be *only* irix for some reason. */
          (!onlymine && (flock1->l_pid == clid))
 #else
@@ -461,7 +461,7 @@ static void DoLockWarning(void)
 afs_lockctl(struct vcache *avc, struct eflock *af, int flag, 
        struct AFS_UCRED *acred, pid_t clid, off_t offset)
 #else
-#if defined(AFS_SGI_ENV) || (defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_SGI_ENV) || (defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 afs_lockctl(struct vcache *avc, struct AFS_FLOCK *af, int acmd, struct AFS_UCRED *acred, pid_t clid)
 #else
 u_int clid=0;
@@ -821,7 +821,7 @@ static int GetFlockCount(struct vcache *avc, struct vrequest *areq)
 #endif
 
 
-#if    !defined(AFS_AIX_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV) && !defined(UKERNEL) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
+#if    !defined(AFS_AIX_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV) && !defined(UKERNEL) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
 /* Flock not support on System V systems */
 #ifdef AFS_OSF_ENV
 extern struct fileops afs_fileops;
index 8c9cb24..9560885 100644 (file)
@@ -397,7 +397,6 @@ void afs_PutFakeStat(struct afs_fakestat_state *state)
     
 int afs_ENameOK(register char *aname)
 {
-    register char tc;
     register int tlen;
 
     AFS_STATCNT(ENameOK);
@@ -470,9 +469,9 @@ int Next_AtSys(register struct vcache *avc, struct vrequest *areq,
       } else
        return 0; /* .*@sys doesn't match either */
   } else if (++(state->index) >= afs_sysnamecount
-            || !afs_sysnamelist[state->index])
+            || !afs_sysnamelist[(int)state->index])
     return 0;  /* end of list */
-  strcpy(state->name+state->offset, afs_sysnamelist[state->index]);
+  strcpy(state->name+state->offset, afs_sysnamelist[(int)state->index]);
   return 1;
 }
 
@@ -527,10 +526,6 @@ int afs_DoBulkStat(struct vcache *adp, long dirCookie, struct vrequest *areqp)
     struct conn *tcp;          /* conn for call */
     AFSCBs cbParm;             /* callback parm for bulk stat */
     struct server *hostp = 0;  /* host we got callback from */
-    long origEvenCBs;          /* original # of callbacks for even-fid files */
-    long origOddCBs;           /* original # of callbacks for odd-fid files */
-    long origEvenZaps;         /* original # of recycles for even-fid files */
-    long origOddZaps;          /* original # of recycles for odd-fid files */
     long startTime;            /* time we started the call,
                                 * for callback expiration base
                                 */
index 2aa65be..4f01069 100644 (file)
@@ -59,7 +59,6 @@ int afs_MemRead(register struct vcache *avc, struct uio *auio, struct AFS_UCRED
     afs_int32 error, trybusy=1;
     struct uio tuio;
     struct iovec *tvec;
-    char *tfile;
     afs_int32 code;
     struct vrequest treq;
 
@@ -449,7 +448,6 @@ int afs_UFSReadFast(register struct vcache *avc, struct uio *auio,
     struct vrequest treq;
     int offDiff;
     struct dcache *tdc;
-    struct vnode *vp;
     struct osi_file *tfile;
     afs_int32 code = 0;
 
@@ -534,7 +532,7 @@ int afs_UFSReadFast(register struct vcache *avc, struct uio *auio,
             VOP_UNLOCK(tfile->vnode, 0, current_proc());
             AFS_GLOCK();
 #else
-#if defined(AFS_FBSD_ENV)
+#if defined(AFS_XBSD_ENV)
             AFS_GUNLOCK();
             VOP_LOCK(tfile->vnode, LK_EXCLUSIVE, curproc);
             code = VOP_READ(tfile->vnode, auio, 0, &afs_osi_cred);
@@ -599,7 +597,6 @@ int afs_UFSRead(register struct vcache *avc, struct uio *auio,
     struct osi_file *tfile;
     afs_int32 code;
     int trybusy=1;
-    struct vnode *vp;
     struct vrequest treq;
 
     AFS_STATCNT(afs_UFSRead);
@@ -947,7 +944,7 @@ tagain:
             VOP_UNLOCK(tfile->vnode, 0, current_proc());
             AFS_GLOCK();
 #else
-#if defined(AFS_FBSD_ENV)
+#if defined(AFS_XBSD_ENV)
             AFS_GUNLOCK();
             VOP_LOCK(tfile->vnode, LK_EXCLUSIVE, curproc);
             code = VOP_READ(tfile->vnode, &tuio, 0, &afs_osi_cred);
index b4dc2a9..661e6da 100644 (file)
@@ -222,10 +222,7 @@ afs_remove(OSI_VC_ARG(adp), aname, acred)
     register afs_int32 code;
     register struct vcache *tvc;
     afs_size_t offset, len;
-    struct AFSFetchStatus OutDirStatus;
-    struct AFSVolSync tsync;
     struct afs_fakestat_state fakestate;
-    XSTATS_DECLS
     OSI_VC_CONVERT(adp)
 
     AFS_STATCNT(afs_remove);
index f153e1c..feb6017 100644 (file)
@@ -29,7 +29,7 @@ RCSID("$Header$");
 
 
 
-#if    defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if    defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 afs_ustrategy(abp, credp)
     struct AFS_UCRED *credp;
 #else
@@ -40,14 +40,14 @@ afs_ustrategy(abp)
     struct uio tuio;
     register struct vcache *tvc = VTOAFS(abp->b_vp);
     register afs_int32 len = abp->b_bcount;
-#if    !defined(AFS_SUN5_ENV) && !defined(AFS_OSF_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
+#if    !defined(AFS_SUN5_ENV) && !defined(AFS_OSF_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
 #ifdef AFS_AIX41_ENV
     struct ucred *credp;
 #else
     struct AFS_UCRED *credp = u.u_cred;
 #endif
 #endif
-#if    defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if    defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
     int async = abp->b_flags & B_ASYNC;
 #endif
     struct iovec tiovec[1];
@@ -75,7 +75,7 @@ afs_ustrategy(abp)
        */
        tuio.afsio_iov = tiovec;
        tuio.afsio_iovcnt = 1;
-#if    defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
+#if    defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_XBSD_ENV)
 #ifdef AFS_64BIT_CLIENT
        tuio.afsio_offset = (afs_offs_t) dbtob(abp->b_blkno);
 #else /* AFS_64BIT_CLIENT */
@@ -92,11 +92,11 @@ afs_ustrategy(abp)
        tuio.afsio_fmode = 0;
 #endif
        tuio.afsio_resid = abp->b_bcount;
-#if defined(AFS_FBSD_ENV)
+#if defined(AFS_XBSD_ENV)
        tiovec[0].iov_base = abp->b_saveaddr;
 #else
        tiovec[0].iov_base = abp->b_un.b_addr;
-#endif /* AFS_FBSD_ENV */
+#endif /* AFS_XBSD_ENV */
        tiovec[0].iov_len = abp->b_bcount;
        /* are user's credentials valid here?  probably, but this
             sure seems like the wrong things to do. */
@@ -107,11 +107,11 @@ afs_ustrategy(abp)
 #endif
        if (code == 0) {
            if (tuio.afsio_resid > 0)
-#if defined(AFS_FBSD_ENV)
+#if defined(AFS_XBSD_ENV)
                memset(abp->b_saveaddr + abp->b_bcount - tuio.afsio_resid, 0, tuio.afsio_resid);
 #else
                memset(abp->b_un.b_addr + abp->b_bcount - tuio.afsio_resid, 0, tuio.afsio_resid);
-#endif /* AFS_FBSD_ENV */
+#endif /* AFS_XBSD_ENV */
 #ifdef AFS_AIX32_ENV
            /*
             * If we read a block that is past EOF and the user was not storing
@@ -166,11 +166,11 @@ afs_ustrategy(abp)
        len = MIN(abp->b_bcount, (VTOAFS(abp->b_vp))->m.Length - dbtob(abp->b_blkno));
 #endif /* AFS_ALPHA_ENV */
        tuio.afsio_resid = len;
-#if defined(AFS_FBSD_ENV)
+#if defined(AFS_XBSD_ENV)
        tiovec[0].iov_base = abp->b_saveaddr;
 #else
        tiovec[0].iov_base = abp->b_un.b_addr;
-#endif /* AFS_FBSD_ENV */
+#endif /* AFS_XBSD_ENV */
        tiovec[0].iov_len = len;
        /* are user's credentials valid here?  probably, but this
             sure seems like the wrong things to do. */
@@ -181,7 +181,7 @@ afs_ustrategy(abp)
 #endif
     }
 #if    !defined(AFS_AIX32_ENV) && !defined(AFS_SUN5_ENV)
-#if defined(AFS_DUX40_ENV) || defined (AFS_FBSD_ENV)
+#if defined(AFS_DUX40_ENV) || defined (AFS_XBSD_ENV)
     if (code) {
        abp->b_error = code;
        abp->b_flags |= B_ERROR;
index 9656dee..31688c4 100644 (file)
@@ -561,7 +561,7 @@ int afs_UFSWrite(register struct vcache *avc, struct uio *auio,
         VOP_UNLOCK(tfile->vnode, 0, current_proc());
         AFS_GLOCK();
 #else
-#if defined(AFS_FBSD_ENV)
+#if defined(AFS_XBSD_ENV)
         AFS_GUNLOCK();
         VOP_LOCK(tfile->vnode, LK_EXCLUSIVE, curproc);
         code = VOP_WRITE(tfile->vnode, &tuio, 0, &afs_osi_cred);
@@ -569,7 +569,7 @@ int afs_UFSWrite(register struct vcache *avc, struct uio *auio,
         AFS_GLOCK();
 #else
        code = VOP_RDWR(tfile->vnode, &tuio, UIO_WRITE, 0, &afs_osi_cred);
-#endif /* AFS_FBSD_ENV */
+#endif /* AFS_XBSD_ENV */
 #endif /* AFS_DARWIN_ENV */
 #endif /* AFS_LINUX20_ENV */
 #endif /* AFS_HPUX100_ENV */
@@ -651,7 +651,7 @@ int afs_UFSWrite(register struct vcache *avc, struct uio *auio,
      * If write is implemented via VM, afs_fsync() is called from the high-level
      * write op.
      */
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
      if (noLock && (aio & IO_SYNC)) {
 #else 
 #ifdef AFS_HPUX_ENV
@@ -691,7 +691,7 @@ int afs_DoPartialWrite(register struct vcache *avc, struct vrequest *areq)
 
 
 
-#if !defined (AFS_AIX_ENV) && !defined (AFS_HPUX_ENV) && !defined (AFS_SUN5_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined (AFS_AIX_ENV) && !defined (AFS_HPUX_ENV) && !defined (AFS_SUN5_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
 #ifdef AFS_DUX50_ENV
 #define vno_close(X) vn_close((X), 0, NOCRED)
 #elif defined(AFS_DUX40_ENV)
index fa3745c..d0a8f2b 100644 (file)
@@ -39,7 +39,7 @@
 #define        AFS_XLATOR_MAGIC        0x87654321
 #endif
 
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 #define AFS_NFSXLATORREQ(cred) 0
 #else
 #ifdef AFS_OSF_ENV
index 25023cd..df0d784 100644 (file)
@@ -52,7 +52,7 @@
 
 /* Extra kernel definitions (from kdefs file) */
 #ifdef _KERNEL
-#define AFS_GLOBAL_SUNLOCK        1
+/* #define AFS_GLOBAL_SUNLOCK        1 */
 #define        AFS_VFS34       1       /* What is VFS34??? */
 #define        AFS_SHORTGID    0       /* are group id's short? */
 #define        afsio_iov       uio_iov
@@ -64,8 +64,8 @@
 #define        AFS_UIOUSER     UIO_USERSPACE
 #define        AFS_CLBYTES     MB_CLBYTES
 #define        osi_GetTime(x)  microtime(x)
-#define        AFS_KALLOC(x)   kalloc(x)
-#define        AFS_KFREE(x,y)  kfree(x,y)
+#define        AFS_KALLOC(x)   osi_Alloc(x)
+#define        AFS_KFREE(x, y) osi_Free((x), (y))
 #define        v_count         v_usecount
 #define v_vfsp         v_mount
 #define vfs_bsize      mnt_stat.f_bsize
index b682136..6ff0b1d 100644 (file)
@@ -3,7 +3,6 @@
 srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
 
-
 # OS specific object files:
 AFS_OS_OBJS = \
        osi_groups.o \
@@ -12,7 +11,8 @@ AFS_OS_OBJS = \
        osi_misc.o \
        osi_sleep.o \
        osi_vm.o \
-       osi_vnodeops.o
+       osi_vnodeops.o \
+       osi_module.o 
 
 AFS_OS_NFSOBJS = \
        osi_vfsops_nfs.o
@@ -22,12 +22,9 @@ AFS_OS_NONFSOBJS = \
 
 
 # System specific build commands and flags
-# KDEFS=-DLANGUAGE_C  -I/usr/sys/include -I../include \
-#       -I/usr/src/sys/${HEADER_RT} -I/usr/src/sys/sys \
-#      -DSWAPTYPE=1 -DUERF -DOSF -DCOMPAT_43 -DUFS \
-#      -DRT -DKERNEL -D_KERNEL
-KDEFS=-Wall -fformat-extensions -ansi -nostdinc -I/usr/include -D_KERNEL \
-       -elf -mpreferred-stack-boundary=2 -I/usr/src/sys/sys -I../afs
+KDEFS=-Wall -nostdinc -I/usr/include \
+       -DLKM -DDIAGNOSTIC -DFIFO -DNFSCLIENT -DMFS -DFFS -D_KERNEL -DI386_CPU -DI486_CPU -DI586_CPU \
+       -I/usr/src/sys/sys -I../afs
 DBUG = -O2
 DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT
 OPTF=${OPT} 
@@ -36,7 +33,7 @@ CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(K
 
 
 # Name of directory to hold object files and libraries.
-KOBJ = STATIC
+KOBJ = COMMON
 
 # This tells Makefile.common to use its single directory build target.
 COMPDIRS = single_compdir
@@ -51,16 +48,15 @@ setup:
        ln -fs ../Makefile $(KOBJ)/Makefile
        ln -fs ../Makefile.common $(KOBJ)/Makefile.common
        ln -fs ../config $(KOBJ)/config
-       -$(RM) -f  h net netinet rpc ufs nfs  machine sys vm
+       -$(RM) -f  h net netinet rpc ufs nfs machine sys
        -ln -fs /usr/src/sys/net net
-       -ln -fs /usr/src/sys/i386/include machine
+       -ln -fs /usr/src/sys/arch/i386/include machine
        -ln -fs /usr/src/sys/netinet netinet
        -ln -fs /usr/src/sys/nfs nfs
        -ln -fs /usr/include/rpc rpc
        -ln -fs /usr/src/sys/sys sys
        -ln -fs /usr/src/sys/ufs/ufs ufs
        -ln -fs /usr/src/sys/sys h
-       -ln -fs /usr/src/sys/vm vm
        -touch $(KOBJ)/sec_net.h
 
 
@@ -75,21 +71,12 @@ DEST_LIBAFS = ${DEST}/root.client/bin/${LIBAFS}
 DEST_LIBAFSNONFS = ${DEST}/root.client/bin/${LIBAFSNONFS}
 
 
-# libafs:      $(LIBAFS) $(LIBAFSNONFS)
+libafs:        $(LIBAFS) $(LIBAFSNONFS)
 # libafs:      $(LIBAFSNONFS)
-# install_libafs:      $(INST_LIBAFS) $(INST_LIBAFSNONFS)
+install_libafs:        $(INST_LIBAFS) $(INST_LIBAFSNONFS)
 # install_libafs:      $(INST_LIBAFSNONFS)
-# dest_libafs: $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
+dest_libafs:   $(DEST_LIBAFS) $(DEST_LIBAFSNONFS)
 # dest_libafs: $(DEST_LIBAFSNONFS)
-libafs:
-       echo WARNING: No kernel module for ${SYS_NAME}
-
-install_libafs:
-       echo WARNING: No kernel module for ${SYS_NAME}
-
-dest_libafs:
-       echo WARNING: No kernel module for ${SYS_NAME}
-
 
 $(INST_LIBAFS): $(LIBAFS)
        $(INSTALL) -f $? $@
index 51e7046..c306672 100644 (file)
@@ -599,12 +599,16 @@ int rxi_GetIFInfo(void)
     memset(addrs, 0, sizeof(addrs));
     memset(mtus, 0, sizeof(mtus));
 
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
     TAILQ_FOREACH(ifn, &ifnet, if_link) {
       if (i >= ADDRSPERSITE) break;
-#else 
+#else
+#if defined(AFS_OBSD_ENV)
+    for (ifn = ifnet.tqh_first; i < ADDRSPERSITE && ifn != NULL; ifn = ifn->if_list.tqe_next) {
+#else
     for (ifn = ifnet; ifn != NULL && i < ADDRSPERSITE; ifn = ifn->if_next) {
 #endif
+#endif
       rxmtu = (ifn->if_mtu - RX_IPUDP_SIZE);
 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
       TAILQ_FOREACH(ifad, &ifn->if_addrhead, ifa_link) {
@@ -1063,7 +1067,7 @@ void rxk_Listener(void)
 #ifdef AFS_SUN5_ENV
     rxk_ListenerPid = 1;       /* No PID, just a flag that we're alive */
 #endif /* AFS_SUN5_ENV */
-#ifdef AFS_FBSD_ENV
+#ifdef AFS_XBSD_ENV
     rxk_ListenerPid = curproc->p_pid;
 #endif /* AFS_FBSD_ENV */
 #if defined(AFS_DARWIN_ENV)