From: Nickolai Zeldovich Date: Thu, 30 Jan 2003 22:03:31 +0000 (+0000) Subject: openbsd-32-glue-20030130 X-Git-Tag: openafs-devel-1_3_50~407 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4fa78ca16848ba10814cee55d0ab419e38770f38;p=packages%2Fo%2Fopenafs.git openbsd-32-glue-20030130 Add glue to support OpenBSD 3.2. --- diff --git a/acinclude.m4 b/acinclude.m4 index 8f546082d..b95ea5d16 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -327,6 +327,9 @@ else i386-unknown-openbsd3.1) AFS_SYSNAME="i386_obsd31" ;; + i386-unknown-openbsd3.2) + AFS_SYSNAME="i386_obsd32" + ;; i?86-*-freebsd4.2*) AFS_SYSNAME="i386_fbsd_42" ;; diff --git a/src/afs/OBSD/osi_vfsops.c b/src/afs/OBSD/osi_vfsops.c index 46cc7d790..242f22c9d 100644 --- a/src/afs/OBSD/osi_vfsops.c +++ b/src/afs/OBSD/osi_vfsops.c @@ -528,3 +528,9 @@ afsmodload(struct lkm_table *lkmtp, int cmd, int ver) } DISPATCH(lkmtp,cmd,ver,afs_vfs_load,afs_vfs_unload,lkm_nofunc); } + +int +libafs_lkmentry(struct lkm_table *lkmtp, int cmd, int ver) +{ + return afsmodload(lkmtp, cmd, ver); +} diff --git a/src/afsd/afs.rc.obsd b/src/afsd/afs.rc.obsd index a0359f9f3..c15ccb658 100644 --- a/src/afsd/afs.rc.obsd +++ b/src/afsd/afs.rc.obsd @@ -2,8 +2,8 @@ # add the following line (without leading '# ') to /etc/rc.securelevel for OpenBSD # . /usr/vice/etc/rc.securelevel.afs -rm -f /usr/vice/etc/dkload/netbsd_afs -/sbin/modload -o /usr/vice/etc/dkload/netbsd_afs -eafsmodload /usr/vice/etc/dkload/libafs.o +rm -f /usr/vice/etc/dkload/openbsd_afs +/sbin/modload -o /usr/vice/etc/dkload/openbsd_afs -eafsmodload /usr/vice/etc/dkload/libafs.o /usr/vice/etc/afsd -nosettime -chunksize 18 -stat 4800 /usr/vice/bin/fs setcrypt crypt diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index 9d39c627a..94e2451ec 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -172,6 +172,7 @@ #define SYS_NAME_ID_sparc64_nbsd16 2513 #define SYS_NAME_ID_i386_obsd31 2600 +#define SYS_NAME_ID_i386_obsd32 2601 /* * Placeholder to keep system-wide standard flags since this file is included by all diff --git a/src/config/param.i386_obsd32.h b/src/config/param.i386_obsd32.h new file mode 100644 index 000000000..f53fdfd21 --- /dev/null +++ b/src/config/param.i386_obsd32.h @@ -0,0 +1,61 @@ +/* + * Jim Rees, University of Michigan CITI + */ + +#ifndef AFS_PARAM_H +#define AFS_PARAM_H + +#ifndef IGNORE_STDS_H +#include +#endif + +#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_ENV 1 +#define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ +#define AFS_OBSD_ENV 1 +#define AFS_NONFSTRANS 1 +#define AFS_KERBEROS_ENV 1 +#define AFS_VM_RDWR_ENV 1 +#define AFS_VFS_ENV 1 +#define AFS_VFSINCL_ENV 1 + +#define FTRUNC O_TRUNC + +#define AFS_SYSCALL 208 +#define AFS_MOUNT_AFS "afs" + +#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 + +#ifndef IGNORE_STDS_H +#include +#endif + +#define SYS_NAME "i386_obsd32" +#define SYS_NAME_ID SYS_NAME_ID_i386_obsd32 + +/* Extra kernel definitions (from kdefs file) */ +#ifdef _KERNEL +#define AFS_GLOBAL_SUNLOCK 1 +#define AFS_SHORTGID 0 /* are group id's short? */ + +#if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) +enum vcexcl {NONEXCL, EXCL}; + +#ifndef MIN +#define MIN(A,B) ((A) < (B) ? (A) : (B)) +#endif +#ifndef MAX +#define MAX(A,B) ((A) > (B) ? (A) : (B)) +#endif + +#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */ +#endif /* _KERNEL */ + +#endif /* AFS_PARAM_H */