openbsd-32-glue-20030130
authorNickolai Zeldovich <kolya@mit.edu>
Thu, 30 Jan 2003 22:03:31 +0000 (22:03 +0000)
committerNickolai Zeldovich <kolya@mit.edu>
Thu, 30 Jan 2003 22:03:31 +0000 (22:03 +0000)
Add glue to support OpenBSD 3.2.

acinclude.m4
src/afs/OBSD/osi_vfsops.c
src/afsd/afs.rc.obsd
src/config/afs_sysnames.h
src/config/param.i386_obsd32.h [new file with mode: 0644]

index 8f54608..b95ea5d 100644 (file)
@@ -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"
                        ;;
index 46cc7d7..242f22c 100644 (file)
@@ -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);
+}
index a0359f9..c15ccb6 100644 (file)
@@ -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
index 9d39c62..94e2451 100644 (file)
 #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 (file)
index 0000000..f53fdfd
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Jim Rees, University of Michigan CITI
+ */
+
+#ifndef        AFS_PARAM_H
+#define        AFS_PARAM_H
+
+#ifndef IGNORE_STDS_H
+#include <sys/param.h>
+#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 <afs/afs_sysnames.h>
+#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 */