DFBSD update dfbsd userland
authorMatt Benjamin <matt@linuxbox.com>
Fri, 27 Aug 2010 23:11:32 +0000 (19:11 -0400)
committerDerrick Brashear <shadow@dementia.org>
Mon, 30 Aug 2010 00:22:40 +0000 (17:22 -0700)
Add new sysnames.  Fix some userland header inclusions,
defend against kernel-mode ioctl interpretation when
building UKERNEL.  Add fragments missing from DFBSD
MakefileProto template.

Change-Id: I56659bfe43dc24ef8a158aaf486c9a6f23643002
Reviewed-on: http://gerrit.openafs.org/2619
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

acinclude.m4
src/afs/DFBSD/osi_inode.h [new file with mode: 0644]
src/afs/UKERNEL/sysincludes.h
src/afsd/afsd.c
src/config/afs_sysnames.h
src/libafs/MakefileProto.DFBSD.in
src/libuafs/MakefileProto.DFBSD.in

index 43df10c..ba8f7b6 100644 (file)
@@ -463,11 +463,11 @@ else
                        vm=${v#*.}
                        AFS_SYSNAME="amd64_fbsd_${vM}${vm}"
                        ;;
-               i386-*-dragonfly2.2*)
-                       AFS_SYSNAME="i386_dfbsd_23"
-                       ;;
-               i386-*-dragonfly2.3*)
-                       AFS_SYSNAME="i386_dfbsd_23"
+               i386-*-dragonfly?.*)
+                       v=${host#*dragonfly}
+                       vM=${v%.*}
+                       vm=${v#*.}
+                       AFS_SYSNAME="i386_dfbsd_${vM}${vm}"
                        ;;
                i?86-*-netbsd*1.6[[M-Z]]*)
                        AFS_SYSNAME="i386_nbsd20"
diff --git a/src/afs/DFBSD/osi_inode.h b/src/afs/DFBSD/osi_inode.h
new file mode 100644 (file)
index 0000000..e69de29
index 013b948..51aea2b 100644 (file)
@@ -11,7 +11,7 @@
 #define __AFS_SYSINCLUDESH__ 1
 
 #include  <stdio.h>
-#if !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_USR_FBSD_ENV) /* must be included after KERNEL undef'd */
+#if !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_USR_FBSD_ENV) && !defined(AFS_USR_DFBSD_ENV) /* must be included after KERNEL undef'd */
 #include  <errno.h>
 #endif
 #include  <stdlib.h>
@@ -20,7 +20,7 @@
 #include  <assert.h>
 #include  <stdarg.h>
 
-#if !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_USR_FBSD_ENV) /* must be included after KERNEL undef'd */
+#if !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_USR_FBSD_ENV) && !defined(AFS_USR_DFBSD_ENV) /* must be included after KERNEL undef'd */
 #include  <unistd.h>
 #include  <ctype.h>
 #include  <sys/types.h>
 #define FREAD                  0x0001
 #endif /* AFS_USR_LINUX22_ENV */
 
-#if defined(AFS_USR_DARWIN_ENV) || defined(AFS_USR_FBSD_ENV)
+#if defined(AFS_USR_DARWIN_ENV) || defined(AFS_USR_FBSD_ENV) || defined(AFS_USR_DFBSD_ENV)
+#ifdef _KERNEL
+#undef _KERNEL
+#endif
 #ifdef KERNEL
 #undef KERNEL
 #define AFS_USR_UNDEF_KERNEL_ENV 1
index 4e8b6e5..f1433cc 100644 (file)
@@ -994,7 +994,7 @@ doSweepAFSCache(int *vFilesFound,
 #if defined(AFS_SGI62_ENV) || defined(AFS_DARWIN90_ENV)
            printf("\tinode=%" AFS_INT64_FMT ", reclen=%d, name='%s'\n", currp->d_ino,
                   currp->d_reclen, currp->d_name);
-#elif defined(AFS_DFBSD_ENV)
+#elif defined(AFS_DFBSD_ENV) || defined(AFS_USR_DFBSD_ENV)
            printf("\tinode=%ld, name='%s'\n", (long)currp->d_ino, currp->d_name);
 #else
            printf("\tinode=%ld, reclen=%d, name='%s'\n", (long)currp->d_ino,
index 011f125..7272ec2 100644 (file)
 
 #define SYS_NAME_ID_i386_dfbsd_22        3900
 #define SYS_NAME_ID_i386_dfbsd_23        3901
+#define SYS_NAME_ID_i386_dfbsd_24        3902
+#define SYS_NAME_ID_i386_dfbsd_25        3903
+#define SYS_NAME_ID_i386_dfbsd_26        3904
+#define SYS_NAME_ID_i386_dfbsd_27        3905
 
 #define SYS_NAME_ID_amd64_obsd36        4005
 #define SYS_NAME_ID_amd64_obsd37        4006
index 65b6af2..41e1b51 100644 (file)
@@ -56,6 +56,9 @@ all:
 setup:
        echo "skipping"
 
+install:
+       echo "skipping"
+
 # Below this line are targets when in the COMMON directory:
 LIBAFS = libafsnfs.ko
 LIBAFSNONFS = libafs.ko
index 65daf9c..07e95a6 100644 (file)
@@ -7,7 +7,10 @@
 # 
 srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
-
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
 
 # System specific build commands and flags
 CC = @CC@