From c6f96ff36d8691a54bfcd2541a42e321f00f3687 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Wed, 18 Sep 2002 00:11:04 +0000 Subject: [PATCH] STABLE12-freebsd-finish-pullup-20020917 sigh. --- src/afs/FBSD/osi_module.c | 91 +++++++++++++++++++++ src/afsd/afs.rc.fbsd | 22 ++--- src/config/Makefile.i386_fbsd_42.in | 6 -- src/config/Makefile.i386_fbsd_43.in | 41 ++++++++++ src/config/Makefile.i386_fbsd_44.in | 41 ++++++++++ src/config/Makefile.i386_fbsd_45.in | 41 ++++++++++ src/config/Makefile.i386_fbsd_46.in | 41 ++++++++++ src/config/param.i386_fbsd_43.h | 117 +++++++++++++++++++++++++++ src/config/param.i386_fbsd_43_usr.h | 60 ++++++++++++++ src/config/param.i386_fbsd_44.h | 119 +++++++++++++++++++++++++++ src/config/param.i386_fbsd_44_usr.h | 61 ++++++++++++++ src/config/param.i386_fbsd_45.h | 120 +++++++++++++++++++++++++++ src/config/param.i386_fbsd_45_usr.h | 62 ++++++++++++++ src/config/param.i386_fbsd_46.h | 121 ++++++++++++++++++++++++++++ src/config/param.i386_fbsd_46_usr.h | 63 +++++++++++++++ src/libuafs/MakefileProto.FBSD.in | 2 +- 16 files changed, 985 insertions(+), 23 deletions(-) create mode 100644 src/afs/FBSD/osi_module.c create mode 100644 src/config/Makefile.i386_fbsd_43.in create mode 100644 src/config/Makefile.i386_fbsd_44.in create mode 100644 src/config/Makefile.i386_fbsd_45.in create mode 100644 src/config/Makefile.i386_fbsd_46.in create mode 100644 src/config/param.i386_fbsd_43.h create mode 100644 src/config/param.i386_fbsd_43_usr.h create mode 100644 src/config/param.i386_fbsd_44.h create mode 100644 src/config/param.i386_fbsd_44_usr.h create mode 100644 src/config/param.i386_fbsd_45.h create mode 100644 src/config/param.i386_fbsd_45_usr.h create mode 100644 src/config/param.i386_fbsd_46.h create mode 100644 src/config/param.i386_fbsd_46_usr.h diff --git a/src/afs/FBSD/osi_module.c b/src/afs/FBSD/osi_module.c new file mode 100644 index 000000000..1b8fbd9da --- /dev/null +++ b/src/afs/FBSD/osi_module.c @@ -0,0 +1,91 @@ + + +#include +#include +#include +#include +#include +#include +#include + +extern struct vfsops afs_vfsops; +extern struct vnodeopv_desc afs_vnodeop_opv_desc; +extern struct mount *afs_globalVFS; +static struct vfsconf afs_vfsconf; + +MALLOC_DEFINE(M_AFS, "afsmisc", "memory used by the AFS filesystem"); + +extern int afs3_syscall(); +extern int Afs_xsetgroups(); +extern int afs_xioctl(); + +int afs_module_handler(module_t mod, int what, void *arg) { + static sy_call_t *old_handler; + static int inited=0; + int error; + error=0; + switch (what) { + case MOD_LOAD: + if (inited) { + printf ("afs cannot be MOD_LOAD'd more than once\n"); + error=-1; + break; + } + if (sysent[AFS_SYSCALL].sy_call != nosys && + sysent[AFS_SYSCALL].sy_call != lkmnosys) { + printf("AFS_SYSCALL in use. aborting\n"); + error=-1; + break; + } + memset(&afs_vfsconf, 0, sizeof(struct vfsconf)); + strcpy(afs_vfsconf.vfc_name, "AFS"); + afs_vfsconf.vfc_vfsops=&afs_vfsops; + afs_vfsconf.vfc_typenum=-1; /* set by vfs_register */ + afs_vfsconf.vfc_flags=VFCF_NETWORK; + vfs_register(&afs_vfsconf); /* doesn't fail */ + vfs_add_vnodeops(&afs_vnodeop_opv_desc); + osi_Init(); + sysent[SYS_setgroups].sy_call=Afs_xsetgroups; + sysent[SYS_ioctl].sy_call=afs_xioctl; + old_handler=sysent[AFS_SYSCALL].sy_call; + sysent[AFS_SYSCALL].sy_call=afs3_syscall; + sysent[AFS_SYSCALL].sy_narg = 5; + inited=1; + break; + case MOD_UNLOAD: +#ifndef RXK_LISTENER_ENV + /* shutdown is incomplete unless RXK_LISTENER_ENV */ + printf("afs: I can't be unloaded yet\n"); + return -1; +#endif + if (! inited) { + error=0; + break; + } + if (afs_globalVFS) { + error=-1; + break; + } + if (vfs_unregister(&afs_vfsconf)) { + error=-1; + break; + } + vfs_rm_vnodeops(&afs_vnodeop_opv_desc); + sysent[SYS_ioctl].sy_call = ioctl; + sysent[SYS_setgroups].sy_call = setgroups; + sysent[AFS_SYSCALL].sy_narg = 0; + sysent[AFS_SYSCALL].sy_call = old_handler; + break; + } + + return (error); +} + + +static moduledata_t afs_mod = { + "afs", + afs_module_handler, + &afs_mod +}; +DECLARE_MODULE(afs, afs_mod, SI_SUB_VFS, SI_ORDER_MIDDLE); + diff --git a/src/afsd/afs.rc.fbsd b/src/afsd/afs.rc.fbsd index c261fc9a9..d7d77e41c 100644 --- a/src/afsd/afs.rc.fbsd +++ b/src/afsd/afs.rc.fbsd @@ -6,19 +6,8 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html -. /etc/rc.common - -CheckForNetwork - -if [ "${NETWORKUP}" = "-NO-" ]; then exit; fi - -if [ -r /var/db/openafs ]; then - VICEETC=/var/db/openafs/etc - AFSD=/usr/sbin/afsd -else - VICEETC=/usr/vice/etc - AFSD=$VICEETC/afsd -fi +VICEETC=/usr/vice/etc +AFSD=$VICEETC/afsd CONFIG=$VICEETC/config AFSDOPT=$CONFIG/afsd.options PACKAGE=$CONFIG/package.options @@ -35,10 +24,10 @@ fi # Need the commands ps, awk, kill, sleep PATH=${PATH}${PATH:+:}/sbin:/bin:/usr/bin -if kmodstat | grep -q openafs ; then +if kmodstat | grep -q afs.ko ; then : else -if [ -d $VICEETC/afs.ko ]; then +if [ -f $VICEETC/afs.ko ]; then echo "Loading AFS kernel extensions" kldload $VICEETC/afs.ko else @@ -46,10 +35,11 @@ else exit 1 fi fi -if kldstat | grep -q openafs ; then +if kldstat | grep -q afs.ko ; then : else echo "AFS kernel extensions failed to initialize. Skipping AFS startup." + exit fi # diff --git a/src/config/Makefile.i386_fbsd_42.in b/src/config/Makefile.i386_fbsd_42.in index 4f2cf9072..d3164238e 100644 --- a/src/config/Makefile.i386_fbsd_42.in +++ b/src/config/Makefile.i386_fbsd_42.in @@ -4,12 +4,6 @@ # # AFS_OSTYPE used to indicate suffixes and os specific subdirectories. AFS_OSTYPE = FBSD -# Base directory for linux kernel source. Actually a prefix which is complete -# when LINUX_VERS is appended to it. -# LINUX_SRCDIR = /usr/src/linux- -# Default list of Linux kernels to build. Build will run only if all -# can be built. To build a different set, specify LINUX_VERS to make. -# LINUX_VERS = 2.2.5-15 2.2.10 2.2.12 2.2.12-20 2.2.13 2.2.14 # # compilation and link editor flags diff --git a/src/config/Makefile.i386_fbsd_43.in b/src/config/Makefile.i386_fbsd_43.in new file mode 100644 index 000000000..d3164238e --- /dev/null +++ b/src/config/Makefile.i386_fbsd_43.in @@ -0,0 +1,41 @@ +# Copyright 1998 Transarc Corporation +# +# Keep macros within each section in sorted order for clean diff displays. +# +# AFS_OSTYPE used to indicate suffixes and os specific subdirectories. +AFS_OSTYPE = FBSD + +# +# compilation and link editor flags +DBG=-g +OPTMZ=-O2 +PAM_CFLAGS = -O2 -pipe -fPIC +# Put -O2 here to _ensure_ all Makefiles pick it up. +XCFLAGS= -O2 -pipe +MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS} +XLDFLAGS= +SHLIB_LDFLAGS = -shared -Xlinker -x +SHLIB_SUFFIX=so +SHLIB_CFLAGS= +# +# libraries +MTLIBS=-pthread +TXLIBS= /usr/lib/libncurses.so +XLIBS=@LIB_AFSDB@ -lcompat + +# +# programs +AR=ar +AS=as +CP=cp +INSTALL=${TOP_SRCDIR}/pinstall/pinstall +LD=ld +MT_CC=cc +MV=mv +RANLIB=ranlib +RM=rm +# +# Other OS specific requirements +# +YACC = bison -y +LEX = flex -l diff --git a/src/config/Makefile.i386_fbsd_44.in b/src/config/Makefile.i386_fbsd_44.in new file mode 100644 index 000000000..d3164238e --- /dev/null +++ b/src/config/Makefile.i386_fbsd_44.in @@ -0,0 +1,41 @@ +# Copyright 1998 Transarc Corporation +# +# Keep macros within each section in sorted order for clean diff displays. +# +# AFS_OSTYPE used to indicate suffixes and os specific subdirectories. +AFS_OSTYPE = FBSD + +# +# compilation and link editor flags +DBG=-g +OPTMZ=-O2 +PAM_CFLAGS = -O2 -pipe -fPIC +# Put -O2 here to _ensure_ all Makefiles pick it up. +XCFLAGS= -O2 -pipe +MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS} +XLDFLAGS= +SHLIB_LDFLAGS = -shared -Xlinker -x +SHLIB_SUFFIX=so +SHLIB_CFLAGS= +# +# libraries +MTLIBS=-pthread +TXLIBS= /usr/lib/libncurses.so +XLIBS=@LIB_AFSDB@ -lcompat + +# +# programs +AR=ar +AS=as +CP=cp +INSTALL=${TOP_SRCDIR}/pinstall/pinstall +LD=ld +MT_CC=cc +MV=mv +RANLIB=ranlib +RM=rm +# +# Other OS specific requirements +# +YACC = bison -y +LEX = flex -l diff --git a/src/config/Makefile.i386_fbsd_45.in b/src/config/Makefile.i386_fbsd_45.in new file mode 100644 index 000000000..d3164238e --- /dev/null +++ b/src/config/Makefile.i386_fbsd_45.in @@ -0,0 +1,41 @@ +# Copyright 1998 Transarc Corporation +# +# Keep macros within each section in sorted order for clean diff displays. +# +# AFS_OSTYPE used to indicate suffixes and os specific subdirectories. +AFS_OSTYPE = FBSD + +# +# compilation and link editor flags +DBG=-g +OPTMZ=-O2 +PAM_CFLAGS = -O2 -pipe -fPIC +# Put -O2 here to _ensure_ all Makefiles pick it up. +XCFLAGS= -O2 -pipe +MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS} +XLDFLAGS= +SHLIB_LDFLAGS = -shared -Xlinker -x +SHLIB_SUFFIX=so +SHLIB_CFLAGS= +# +# libraries +MTLIBS=-pthread +TXLIBS= /usr/lib/libncurses.so +XLIBS=@LIB_AFSDB@ -lcompat + +# +# programs +AR=ar +AS=as +CP=cp +INSTALL=${TOP_SRCDIR}/pinstall/pinstall +LD=ld +MT_CC=cc +MV=mv +RANLIB=ranlib +RM=rm +# +# Other OS specific requirements +# +YACC = bison -y +LEX = flex -l diff --git a/src/config/Makefile.i386_fbsd_46.in b/src/config/Makefile.i386_fbsd_46.in new file mode 100644 index 000000000..d3164238e --- /dev/null +++ b/src/config/Makefile.i386_fbsd_46.in @@ -0,0 +1,41 @@ +# Copyright 1998 Transarc Corporation +# +# Keep macros within each section in sorted order for clean diff displays. +# +# AFS_OSTYPE used to indicate suffixes and os specific subdirectories. +AFS_OSTYPE = FBSD + +# +# compilation and link editor flags +DBG=-g +OPTMZ=-O2 +PAM_CFLAGS = -O2 -pipe -fPIC +# Put -O2 here to _ensure_ all Makefiles pick it up. +XCFLAGS= -O2 -pipe +MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS} +XLDFLAGS= +SHLIB_LDFLAGS = -shared -Xlinker -x +SHLIB_SUFFIX=so +SHLIB_CFLAGS= +# +# libraries +MTLIBS=-pthread +TXLIBS= /usr/lib/libncurses.so +XLIBS=@LIB_AFSDB@ -lcompat + +# +# programs +AR=ar +AS=as +CP=cp +INSTALL=${TOP_SRCDIR}/pinstall/pinstall +LD=ld +MT_CC=cc +MV=mv +RANLIB=ranlib +RM=rm +# +# Other OS specific requirements +# +YACC = bison -y +LEX = flex -l diff --git a/src/config/param.i386_fbsd_43.h b/src/config/param.i386_fbsd_43.h new file mode 100644 index 000000000..3f84a33e8 --- /dev/null +++ b/src/config/param.i386_fbsd_43.h @@ -0,0 +1,117 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#include + +#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */ +#define AFS_X86_XBSD_ENV 1 + +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_FBSD_ENV 1 +#define AFS_FBSD40_ENV 1 +#define AFS_FBSD42_ENV 1 +#define AFS_FBSD43_ENV 1 +#define AFS_X86_FBSD_ENV 1 +#define AFS_X86_FBSD40_ENV 1 +#define AFS_X86_FBSD42_ENV 1 +#define AFS_X86_FBSD43_ENV 1 +#define AFS_X86_ENV 1 +#define AFS_NONFSTRANS 1 +#define O_SYNC O_FSYNC +#define FTRUNC O_TRUNC + +#define IUPD 0x0010 +#define IACC 0x0020 +#define ICHG 0x0040 +#define IMOD 0x0080 + +#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \ + NULL, curproc) +#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \ + NULL, curproc) + +#include + +#define AFS_VM_RDWR_ENV 1 +#define AFS_VFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_GREEDY43_ENV 1 +#define AFS_ENV 1 + +#define AFS_SYSCALL 210 +#define AFS_MOUNT_AFS "afs" + +#ifndef MOUNT_UFS +#define MOUNT_UFS "ufs" +#endif + +#ifndef MOUNT_AFS +#define MOUNT_AFS AFS_MOUNT_AFS +#endif +#define SYS_NAME "i386_fbsd_43" +#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_43 + +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't supports statvfs */ + +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ + +#define AFSLITTLE_ENDIAN 1 + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_VFS34 1 /* What is VFS34??? */ +#define AFS_SHORTGID 1 /* are group id's short? */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES CLBYTES +#define osi_GetTime(x) microtime(x) +#define AFS_KALLOC(x) malloc(x, M_AFS, M_WAITOK) +#define AFS_KFREE(x,y) free(x,M_AFS) +#define v_count v_usecount +#define v_vfsp v_mount +#define vfs_bsize mnt_stat.f_bsize +#define vfs_fsid mnt_stat.f_fsid +#define va_nodeid va_fileid +#define vfs_vnodecovered mnt_vnodecovered +#define direct dirent +#define vnode_t struct vnode + +#ifndef MUTEX_DEFAULT +#define MUTEX_DEFAULT 0 +#endif /* MUTEX_DEFAULT */ + +#ifndef SSYS +#define SSYS 0x00002 +#endif /* SSYS */ + +#define p_rcred p_ucred + +#define VN_RELE(vp) vrele(((struct vnode *)(vp))) +#define VN_HOLD(vp) VREF(((struct vnode *)(vp))) + +#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) +enum vcexcl {NONEXCL, EXCL}; + +#ifdef KERNEL +#ifndef MIN +#define MIN(A,B) ((A) < (B) ? (A) : (B)) +#endif +#ifndef MAX +#define MAX(A,B) ((A) > (B) ? (A) : (B)) +#endif +#endif /* KERNEL */ + +#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */ +#endif /* _KERNEL */ + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_fbsd_43_usr.h b/src/config/param.i386_fbsd_43_usr.h new file mode 100644 index 000000000..dc06748f7 --- /dev/null +++ b/src/config/param.i386_fbsd_43_usr.h @@ -0,0 +1,60 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + + +#define UKERNEL 1 /* user space kernel */ +#define AFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_USR_FBSD40_ENV 1 +#define AFS_USR_FBSD42_ENV 1 +#define AFS_USR_FBSD43_ENV 1 +#define AFS_USR_FBSD_ENV 1 +#define AFS_NONFSTRANS 1 + +#define O_SYNC O_FSYNC + +#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */ +#define AFS_SYSCALL 210 +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#include + +#define AFS_USERSPACE_IP_ADDR 1 +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + +/* Machine / Operating system information */ +#define SYS_NAME "i386_fbsd_43" +#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_43 +#define AFSLITTLE_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ +#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ + +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS 1 +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES MCLBYTES +#define AFS_MINCHANGE 2 +#define VATTR_NULL usr_vattr_null + +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_fbsd_44.h b/src/config/param.i386_fbsd_44.h new file mode 100644 index 000000000..de509e05b --- /dev/null +++ b/src/config/param.i386_fbsd_44.h @@ -0,0 +1,119 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#include + +#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */ +#define AFS_X86_XBSD_ENV 1 + +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_FBSD_ENV 1 +#define AFS_FBSD40_ENV 1 +#define AFS_FBSD42_ENV 1 +#define AFS_FBSD43_ENV 1 +#define AFS_FBSD44_ENV 1 +#define AFS_X86_FBSD_ENV 1 +#define AFS_X86_FBSD40_ENV 1 +#define AFS_X86_FBSD42_ENV 1 +#define AFS_X86_FBSD43_ENV 1 +#define AFS_X86_FBSD44_ENV 1 +#define AFS_X86_ENV 1 +#define AFS_NONFSTRANS 1 +#define O_SYNC O_FSYNC +#define FTRUNC O_TRUNC + +#define IUPD 0x0010 +#define IACC 0x0020 +#define ICHG 0x0040 +#define IMOD 0x0080 + +#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \ + NULL, curproc) +#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \ + NULL, curproc) + +#include + +#define AFS_VM_RDWR_ENV 1 +#define AFS_VFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_GREEDY43_ENV 1 +#define AFS_ENV 1 + +#define AFS_SYSCALL 210 +#define AFS_MOUNT_AFS "afs" + +#ifndef MOUNT_UFS +#define MOUNT_UFS "ufs" +#endif + +#ifndef MOUNT_AFS +#define MOUNT_AFS AFS_MOUNT_AFS +#endif +#define SYS_NAME "i386_fbsd_44" +#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_44 + +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't supports statvfs */ + +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ + +#define AFSLITTLE_ENDIAN 1 + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_VFS34 1 /* What is VFS34??? */ +#define AFS_SHORTGID 1 /* are group id's short? */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES CLBYTES +#define osi_GetTime(x) microtime(x) +#define AFS_KALLOC(x) malloc(x, M_AFS, M_WAITOK) +#define AFS_KFREE(x,y) free(x,M_AFS) +#define v_count v_usecount +#define v_vfsp v_mount +#define vfs_bsize mnt_stat.f_bsize +#define vfs_fsid mnt_stat.f_fsid +#define va_nodeid va_fileid +#define vfs_vnodecovered mnt_vnodecovered +#define direct dirent +#define vnode_t struct vnode + +#ifndef MUTEX_DEFAULT +#define MUTEX_DEFAULT 0 +#endif /* MUTEX_DEFAULT */ + +#ifndef SSYS +#define SSYS 0x00002 +#endif /* SSYS */ + +#define p_rcred p_ucred + +#define VN_RELE(vp) vrele(((struct vnode *)(vp))) +#define VN_HOLD(vp) VREF(((struct vnode *)(vp))) + +#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) +enum vcexcl {NONEXCL, EXCL}; + +#ifdef KERNEL +#ifndef MIN +#define MIN(A,B) ((A) < (B) ? (A) : (B)) +#endif +#ifndef MAX +#define MAX(A,B) ((A) > (B) ? (A) : (B)) +#endif +#endif /* KERNEL */ + +#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */ +#endif /* _KERNEL */ + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_fbsd_44_usr.h b/src/config/param.i386_fbsd_44_usr.h new file mode 100644 index 000000000..201a46cc3 --- /dev/null +++ b/src/config/param.i386_fbsd_44_usr.h @@ -0,0 +1,61 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + + +#define UKERNEL 1 /* user space kernel */ +#define AFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_USR_FBSD40_ENV 1 +#define AFS_USR_FBSD42_ENV 1 +#define AFS_USR_FBSD43_ENV 1 +#define AFS_USR_FBSD44_ENV 1 +#define AFS_USR_FBSD_ENV 1 +#define AFS_NONFSTRANS 1 + +#define O_SYNC O_FSYNC + +#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */ +#define AFS_SYSCALL 210 +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#include + +#define AFS_USERSPACE_IP_ADDR 1 +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + +/* Machine / Operating system information */ +#define SYS_NAME "i386_fbsd_44" +#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_44 +#define AFSLITTLE_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ +#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ + +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS 1 +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES MCLBYTES +#define AFS_MINCHANGE 2 +#define VATTR_NULL usr_vattr_null + +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_fbsd_45.h b/src/config/param.i386_fbsd_45.h new file mode 100644 index 000000000..7e9975061 --- /dev/null +++ b/src/config/param.i386_fbsd_45.h @@ -0,0 +1,120 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#include + +#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */ +#define AFS_X86_XBSD_ENV 1 + +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_FBSD_ENV 1 +#define AFS_FBSD40_ENV 1 +#define AFS_FBSD42_ENV 1 +#define AFS_FBSD43_ENV 1 +#define AFS_FBSD44_ENV 1 +#define AFS_FBSD45_ENV 1 +#define AFS_X86_FBSD_ENV 1 +#define AFS_X86_FBSD40_ENV 1 +#define AFS_X86_FBSD42_ENV 1 +#define AFS_X86_FBSD43_ENV 1 +#define AFS_X86_FBSD45_ENV 1 +#define AFS_X86_ENV 1 +#define AFS_NONFSTRANS 1 +#define O_SYNC O_FSYNC +#define FTRUNC O_TRUNC + +#define IUPD 0x0010 +#define IACC 0x0020 +#define ICHG 0x0040 +#define IMOD 0x0080 + +#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \ + NULL, curproc) +#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \ + NULL, curproc) + +#include + +#define AFS_VM_RDWR_ENV 1 +#define AFS_VFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_GREEDY43_ENV 1 +#define AFS_ENV 1 + +#define AFS_SYSCALL 210 +#define AFS_MOUNT_AFS "afs" + +#ifndef MOUNT_UFS +#define MOUNT_UFS "ufs" +#endif + +#ifndef MOUNT_AFS +#define MOUNT_AFS AFS_MOUNT_AFS +#endif +#define SYS_NAME "i386_fbsd_45" +#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_45 + +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't supports statvfs */ + +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ + +#define AFSLITTLE_ENDIAN 1 + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_VFS34 1 /* What is VFS34??? */ +#define AFS_SHORTGID 1 /* are group id's short? */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES CLBYTES +#define osi_GetTime(x) microtime(x) +#define AFS_KALLOC(x) malloc(x, M_AFS, M_WAITOK) +#define AFS_KFREE(x,y) free(x,M_AFS) +#define v_count v_usecount +#define v_vfsp v_mount +#define vfs_bsize mnt_stat.f_bsize +#define vfs_fsid mnt_stat.f_fsid +#define va_nodeid va_fileid +#define vfs_vnodecovered mnt_vnodecovered +#define direct dirent +#define vnode_t struct vnode + +#ifndef MUTEX_DEFAULT +#define MUTEX_DEFAULT 0 +#endif /* MUTEX_DEFAULT */ + +#ifndef SSYS +#define SSYS 0x00002 +#endif /* SSYS */ + +#define p_rcred p_ucred + +#define VN_RELE(vp) vrele(((struct vnode *)(vp))) +#define VN_HOLD(vp) VREF(((struct vnode *)(vp))) + +#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) +enum vcexcl {NONEXCL, EXCL}; + +#ifdef KERNEL +#ifndef MIN +#define MIN(A,B) ((A) < (B) ? (A) : (B)) +#endif +#ifndef MAX +#define MAX(A,B) ((A) > (B) ? (A) : (B)) +#endif +#endif /* KERNEL */ + +#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */ +#endif /* _KERNEL */ + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_fbsd_45_usr.h b/src/config/param.i386_fbsd_45_usr.h new file mode 100644 index 000000000..d1bcbae4a --- /dev/null +++ b/src/config/param.i386_fbsd_45_usr.h @@ -0,0 +1,62 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + + +#define UKERNEL 1 /* user space kernel */ +#define AFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_USR_FBSD40_ENV 1 +#define AFS_USR_FBSD42_ENV 1 +#define AFS_USR_FBSD43_ENV 1 +#define AFS_USR_FBSD44_ENV 1 +#define AFS_USR_FBSD45_ENV 1 +#define AFS_USR_FBSD_ENV 1 +#define AFS_NONFSTRANS 1 + +#define O_SYNC O_FSYNC + +#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */ +#define AFS_SYSCALL 210 +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#include + +#define AFS_USERSPACE_IP_ADDR 1 +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + +/* Machine / Operating system information */ +#define SYS_NAME "i386_fbsd_45" +#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_45 +#define AFSLITTLE_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ +#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ + +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS 1 +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES MCLBYTES +#define AFS_MINCHANGE 2 +#define VATTR_NULL usr_vattr_null + +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_fbsd_46.h b/src/config/param.i386_fbsd_46.h new file mode 100644 index 000000000..e78d4dc8f --- /dev/null +++ b/src/config/param.i386_fbsd_46.h @@ -0,0 +1,121 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#include + +#define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */ +#define AFS_X86_XBSD_ENV 1 + +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_FBSD_ENV 1 +#define AFS_FBSD40_ENV 1 +#define AFS_FBSD42_ENV 1 +#define AFS_FBSD43_ENV 1 +#define AFS_FBSD44_ENV 1 +#define AFS_FBSD45_ENV 1 +#define AFS_FBSD46_ENV 1 +#define AFS_X86_FBSD_ENV 1 +#define AFS_X86_FBSD40_ENV 1 +#define AFS_X86_FBSD42_ENV 1 +#define AFS_X86_FBSD43_ENV 1 +#define AFS_X86_FBSD46_ENV 1 +#define AFS_X86_ENV 1 +#define AFS_NONFSTRANS 1 +#define O_SYNC O_FSYNC +#define FTRUNC O_TRUNC + +#define IUPD 0x0010 +#define IACC 0x0020 +#define ICHG 0x0040 +#define IMOD 0x0080 + +#define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \ + NULL, curproc) +#define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \ + NULL, curproc) + +#include + +#define AFS_VM_RDWR_ENV 1 +#define AFS_VFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_GREEDY43_ENV 1 +#define AFS_ENV 1 + +#define AFS_SYSCALL 210 +#define AFS_MOUNT_AFS "afs" + +#ifndef MOUNT_UFS +#define MOUNT_UFS "ufs" +#endif + +#ifndef MOUNT_AFS +#define MOUNT_AFS AFS_MOUNT_AFS +#endif +#define SYS_NAME "i386_fbsd_46" +#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_46 + +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't supports statvfs */ + +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ +#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ + +#define AFSLITTLE_ENDIAN 1 + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_VFS34 1 /* What is VFS34??? */ +#define AFS_SHORTGID 1 /* are group id's short? */ +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_resid uio_resid +#define AFS_UIOSYS UIO_SYSSPACE +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES CLBYTES +#define osi_GetTime(x) microtime(x) +#define AFS_KALLOC(x) malloc(x, M_AFS, M_WAITOK) +#define AFS_KFREE(x,y) free(x,M_AFS) +#define v_count v_usecount +#define v_vfsp v_mount +#define vfs_bsize mnt_stat.f_bsize +#define vfs_fsid mnt_stat.f_fsid +#define va_nodeid va_fileid +#define vfs_vnodecovered mnt_vnodecovered +#define direct dirent +#define vnode_t struct vnode + +#ifndef MUTEX_DEFAULT +#define MUTEX_DEFAULT 0 +#endif /* MUTEX_DEFAULT */ + +#ifndef SSYS +#define SSYS 0x00002 +#endif /* SSYS */ + +#define p_rcred p_ucred + +#define VN_RELE(vp) vrele(((struct vnode *)(vp))) +#define VN_HOLD(vp) VREF(((struct vnode *)(vp))) + +#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) +enum vcexcl {NONEXCL, EXCL}; + +#ifdef KERNEL +#ifndef MIN +#define MIN(A,B) ((A) < (B) ? (A) : (B)) +#endif +#ifndef MAX +#define MAX(A,B) ((A) > (B) ? (A) : (B)) +#endif +#endif /* KERNEL */ + +#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */ +#endif /* _KERNEL */ + +#endif /* AFS_PARAM_H */ diff --git a/src/config/param.i386_fbsd_46_usr.h b/src/config/param.i386_fbsd_46_usr.h new file mode 100644 index 000000000..0f78ce8fe --- /dev/null +++ b/src/config/param.i386_fbsd_46_usr.h @@ -0,0 +1,63 @@ +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + + +#define UKERNEL 1 /* user space kernel */ +#define AFS_ENV 1 +#define AFS_VFSINCL_ENV 1 +#define AFS_USR_FBSD40_ENV 1 +#define AFS_USR_FBSD42_ENV 1 +#define AFS_USR_FBSD43_ENV 1 +#define AFS_USR_FBSD44_ENV 1 +#define AFS_USR_FBSD45_ENV 1 +#define AFS_USR_FBSD46_ENV 1 +#define AFS_USR_FBSD_ENV 1 +#define AFS_NONFSTRANS 1 + +#define O_SYNC O_FSYNC + +#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */ +#define AFS_SYSCALL 210 +#define AFS_NAMEI_ENV 1 /* User space interface to file system */ +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#include + +#define AFS_USERSPACE_IP_ADDR 1 +#define RXK_LISTENER_ENV 1 +#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + +/* Machine / Operating system information */ +#define SYS_NAME "i386_fbsd_46" +#define SYS_NAME_ID SYS_NAME_ID_i386_fbsd_46 +#define AFSLITTLE_ENDIAN 1 +#define AFS_HAVE_FFS 1 /* Use system's ffs. */ +#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */ +#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ + +#define afsio_iov uio_iov +#define afsio_iovcnt uio_iovcnt +#define afsio_offset uio_offset +#define afsio_seg uio_segflg +#define afsio_fmode uio_fmode +#define afsio_resid uio_resid +#define AFS_UIOSYS 1 +#define AFS_UIOUSER UIO_USERSPACE +#define AFS_CLBYTES MCLBYTES +#define AFS_MINCHANGE 2 +#define VATTR_NULL usr_vattr_null + +#define AFS_DIRENT +#ifndef CMSERVERPREF +#define CMSERVERPREF +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* AFS_PARAM_H */ diff --git a/src/libuafs/MakefileProto.FBSD.in b/src/libuafs/MakefileProto.FBSD.in index e597b89ef..27ab64820 100644 --- a/src/libuafs/MakefileProto.FBSD.in +++ b/src/libuafs/MakefileProto.FBSD.in @@ -72,7 +72,7 @@ UAFS/$(LIBUAFS): setup_uafs $(MAKE) $(LIBUAFS) DESTDIR=${DESTDIR} AFSWEB/$(LIBAFSWEB): setup_nsafs -cd AFSWEB; \ + cd AFSWEB; \ $(MAKE) $(LIBAFSWEB) DESTDIR=${DESTDIR} AFSWEB/$(LIBAFSWEBKRB): setup_nsafs -- 2.39.5