]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Initial revision
authorSam Hartman <hartmans@debian.org>
Sun, 14 Oct 2001 18:03:36 +0000 (18:03 +0000)
committerSam Hartman <hartmans@debian.org>
Sun, 14 Oct 2001 18:03:36 +0000 (18:03 +0000)
14 files changed:
src/afsd/afs.rc.solaris.2.9 [new file with mode: 0644]
src/config/Makefile.alpha_linux_24.in [new file with mode: 0644]
src/config/Makefile.parisc_linux24.in [new file with mode: 0644]
src/config/Makefile.sun4x_59.in [new file with mode: 0644]
src/config/make_vnode.pl [new file with mode: 0644]
src/config/param.alpha_linux_24.h [new file with mode: 0644]
src/config/param.alpha_linux_24_usr.h [new file with mode: 0644]
src/config/param.parisc_linux24.h [new file with mode: 0644]
src/config/param.parisc_linux24_usr.h [new file with mode: 0644]
src/config/param.sun4x_59.h [new file with mode: 0644]
src/config/param.sun4x_59_usr.h [new file with mode: 0644]
src/des/conf-parisc-linux.h [new file with mode: 0644]
src/venus/kdump.sh.linux [new file with mode: 0644]
src/venus/livesys.c [new file with mode: 0644]

diff --git a/src/afsd/afs.rc.solaris.2.9 b/src/afsd/afs.rc.solaris.2.9
new file mode 100644 (file)
index 0000000..00967eb
--- /dev/null
@@ -0,0 +1,188 @@
+#!/bin/sh
+#
+# afs.rc: rc script for AFS on Solaris 2.x platforms
+#
+# Install this script as /etc/init.d/afs.rc
+# then make links like this:
+# ln -s ../init.d/afs.rc /etc/rc0.d/K66afs
+# ln -s ../init.d/afs.rc /etc/rc2.d/S70afs 
+#
+CONFIG=/usr/vice/etc/config
+AFSDOPT=$CONFIG/afsd.options
+PACKAGE=$CONFIG/package.options
+
+LARGE="-stat 2800 -dcache 2400 -daemons 5 -volumes 128 -afsdb"
+MEDIUM="-stat 2000 -dcache 800 -daemons 3 -volumes 70 -afsdb"
+SMALL="-stat 300 -dcache 100 -daemons 2 -volumes 50 -afsdb"
+
+if [ -f $AFSDOPT ]; then
+    OPTIONS=`cat $AFSDOPT`
+else
+    OPTIONS=$MEDIUM
+fi
+
+# Need the commands ps, awk, kill, sleep
+PATH=${PATH}${PATH:+:}/sbin:/bin:/usr/bin
+
+killproc() {            # kill the named process(es)
+      awkfield2='$2'
+        pid=`ps -ef | awk "/$1/ && ! /awk/ {print $awkfield2}"`
+        [ "$pid" != "" ] && kill -KILL $pid
+}
+
+case $1 in
+'start')
+
+#
+# Make sure afs exists in /etc/name_to_sysnum
+#
+if grep -s "afs" /etc/name_to_sysnum > /dev/null; then
+    echo "Entry for afs already exists in /etc/name_to_sysnum"
+else
+    echo "Creating entry for afs in /etc/name_to_sysnum"
+    cp /etc/name_to_sysnum /etc/name_to_sysnum.orig
+    sed '/nfs/i\
+afs                    65' /etc/name_to_sysnum > /tmp/name_to_sysnum
+    mv /tmp/name_to_sysnum /etc/name_to_sysnum
+    echo "Rebooting now for new /etc/name_to_sysnum to take effect"
+    reboot
+fi
+
+## Check to see that /bin/isalist exists and is executable
+if [ ! -x /bin/isalist ] ;then
+      echo "/bin/isalist not executable"
+      exit 1;
+fi
+
+## Determine if we are running the 64 bit OS
+## If sparcv9 then the location of the afs and nfs extensions differ
+
+case `/bin/isalist` in
+    *sparcv9* )
+              nfssrv=/kernel/misc/sparcv9/nfssrv
+              afs=/kernel/fs/sparcv9/afs ;;
+          * )
+              nfssrv=/kernel/misc/nfssrv
+              afs=/kernel/fs/afs ;;
+esac
+
+
+#
+# Load kernel extensions
+#
+# nfssrv has to be loaded first
+
+
+if [ -f $nfssrv ]; then
+      echo "Loading NFS server kernel extensions"
+      modload $nfssrv
+else
+      echo "$nfssrv does not exist. Skipping AFS startup."
+      exit 1
+fi
+
+## Load AFS kernel extensions
+
+if [ -f $afs ]; then
+      echo "Loading AFS kernel extensions"
+      modload $afs
+else
+      echo "$afs does not exist. Skipping AFS startup."
+      exit 1
+fi
+
+#
+# Start the AFS server processes if a bosserver exists
+#
+
+if [ -x /usr/afs/bin/bosserver ]; then
+      echo "Starting AFS Server processes"
+      /usr/afs/bin/bosserver &
+      OPTIONS="$OPTIONS -nosettime"
+      sleep 30
+fi
+
+#
+# Check that all of the client configuration files exist
+#
+
+for file in /usr/vice/etc/afsd /usr/vice/etc/cacheinfo \
+          /usr/vice/etc/ThisCell /usr/vice/etc/CellServDB
+do
+      if [ ! -f ${file} ]; then
+              echo "${file} does not exist. Not starting AFS client."
+              exit 1
+      fi
+done
+
+#
+# Check that the root directory for AFS (/afs) 
+# and the cache directory (/usr/vice/cache) both exist
+#
+
+for dir in `awk -F: '{print $1, $2}' /usr/vice/etc/cacheinfo`
+do
+      if [ ! -d ${dir} ]; then
+              echo "${dir} does not exist. Not starting AFS client."
+              exit 2
+      fi
+done
+
+echo "Starting afsd"
+/usr/vice/etc/afsd $OPTIONS
+
+#
+# Run package to update the disk
+#
+if [ -f /usr/afsws/etc/package -a -f $PACKAGE ]; then
+      /usr/afsws/etc/package -v -o `cat $PACKAGE` > /dev/console 2>&1
+case $? in
+0)
+      (echo "Package completed successfully") > /dev/console 2>&1
+      date > /dev/console 2>&1
+      ;;
+4)
+      (echo "Rebooting to restart system") > /dev/console 2>&1
+      sync
+      /etc/reboot
+      ;;
+*)
+      (echo "Package update failed; continuing") > /dev/console 2>&1
+      ;;
+esac
+fi
+
+#
+# Start AFS inetd services
+# (See the AFS Command Ref. for notes on the proper configuration of inetd.afs)
+#
+if [ -f /usr/sbin/inetd.afs -a -f /etc/inetd.conf.afs ]; then
+      /usr/sbin/inetd.afs /etc/inetd.conf.afs
+fi
+
+echo ;;
+
+'stop')
+
+#
+# Stop the AFS inetd and server processes
+# Note that the afsd processes cannot be killed
+#
+
+echo "Killing inetd.afs"
+killproc inetd.afs
+
+bosrunning=`ps -ef | awk '/bosserver/ && ! /awk/'`
+if [ "${bosrunning}" != "" ]; then
+      echo "Shutting down AFS server processes"
+      /usr/afs/bin/bos shutdown localhost -localauth -wait
+      echo "Killing AFS bosserver"
+      killproc bosserver
+fi
+
+echo ;;
+
+*)    echo "Invalid option supplied to $0"
+      exit 1;;
+esac
diff --git a/src/config/Makefile.alpha_linux_24.in b/src/config/Makefile.alpha_linux_24.in
new file mode 100644 (file)
index 0000000..83fba93
--- /dev/null
@@ -0,0 +1,45 @@
+# Makefile for Linux 2.2.16 kernel on Alpha with glibc 2.2
+# Keep macros within each section in sorted order for clean diff displays.
+#
+# AFS_OSTYPE used to indicate suffixes and os specific subdirectories.
+AFS_OSTYPE = LINUX
+# 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.16
+
+#
+# compilation and link editor flags
+DBG=-g
+OPTMZ=-O2
+PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
+# Put -O2 here to _ensure_ all Makefiles pick it up.
+XCFLAGS= -O2
+MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}
+XLDFLAGS=
+SHARE_LDFLAGS = -shared -Xlinker -x
+SHLIB_SUFFIX=so
+SHLIB_CFLAGS=
+#
+# libraries
+MTLIBS=-lpthread
+TXLIBS= /usr/lib/libncurses.so
+XLIBS=@LIB_AFSDB@
+#
+# 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.parisc_linux24.in b/src/config/Makefile.parisc_linux24.in
new file mode 100644 (file)
index 0000000..9635c31
--- /dev/null
@@ -0,0 +1,43 @@
+# AFS_OSTYPE used to indicate suffixes and os specific subdirectories.
+AFS_OSTYPE = LINUX
+
+# 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 = @LINUX_VERSION@
+
+#
+# compilation and link editor flags
+DBG=-g
+OPTMZ=-O2
+PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
+# Put -O2 here to _ensure_ all Makefiles pick it up.
+XCFLAGS= -O2
+MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}
+XLDFLAGS=
+SHARE_LDFLAGS = -shared -Xlinker -x
+SHLIB_SUFFIX=so
+SHLIB_CFLAGS=
+#
+# libraries
+MTLIBS=-lpthread
+TXLIBS= /usr/lib/libncurses.so
+XLIBS= @LIB_AFSDB@
+#
+# programs
+AR=ar
+AS=as
+CP=cp
+LD=ld
+MT_CC=cc
+MV=mv
+RANLIB=ranlib
+RM=rm
+INSTALL=${TOP_SRCDIR}/pinstall/pinstall
+#
+# Other OS specific requirements
+#
+YACC = bison -y
+LEX = flex -l
diff --git a/src/config/Makefile.sun4x_59.in b/src/config/Makefile.sun4x_59.in
new file mode 100644 (file)
index 0000000..e1fb130
--- /dev/null
@@ -0,0 +1,48 @@
+# Keep macros within each section in sorted order for clean diff displays.
+#
+# AFS_OSTYPE used to indicate suffixes and os specific subdirectories.
+AFS_OSTYPE = SOLARIS
+#
+# compilation and link editor flags
+XCFLAGS=-dy -Bdynamic
+MT_CFLAGS=-mt -DAFS_PTHREAD_ENV ${XCFLAGS}
+PAM_CFLAGS = -KPIC
+PAMLIBS= -lc -lpam -lsocket -lnsl -lm
+SHARE_LDFLAGS = -G -Bsymbolic
+LWP_OPTMZ=-g
+OPTMZ=-O
+DBG=-g
+
+## Compilation flags for 64 bit Solaris
+XCFLAGS64 = ${XCFLAGS} -xarch=v9
+
+#
+# libraries
+XLIBS=@LIB_AFSDB@ -lsocket -lnsl -lintl -ldl 
+TXLIBS=-lcurses
+MTLIBS=-lpthread -lsocket
+XLIBELFA=-lelf
+XLIBKVM=-lkvm
+#
+SHLIB_SUFFIX=so
+SHLIB_CFLAGS=-KPIC
+#
+# programs
+AR=/usr/ccs/bin/ar
+AS=as
+CC=/opt/SUNWspro/bin/cc
+MT_CC=/opt/SUNWspro/bin/cc
+CP=/bin/cp
+LEX=lex
+LD= /usr/ccs/bin/ld
+LORDER = /usr/ccs/bin/lorder
+MV=mv
+RANLIB=/bin/true
+RM=rm
+STRIP= /usr/ccs/bin/strip
+INSTALL=${TOP_SRCDIR}/pinstall/pinstall
+#
+# this is for the vol package
+FS_CONV_SOL26         = fs_conv_sol26
+install_FS_CONV_SOL26 = $(DESTDIR)${afssrvsbindir}/fs_conv_sol26
+dest_FS_CONV_SOL26    = $(DEST)/root.server/usr/afs/bin/fs_conv_sol26
diff --git a/src/config/make_vnode.pl b/src/config/make_vnode.pl
new file mode 100644 (file)
index 0000000..c020861
--- /dev/null
@@ -0,0 +1,113 @@
+#!/usr/bin/perl
+#
+# Make VNODE structure from INODE structure
+#
+# Created By:  Derek Atkins <warlord@MIT.EDU>
+#
+
+$linux_header_dir="/usr/src/linux";
+$outdir="./src/afs/LINUX";
+
+$sepline="/* LINUX VNODE INCLUDED BELOW -- DO NOT MODIFY */\n";
+
+# makeVfs (fs.h, vfs.hin, vfs.out)
+sub makeVfs {
+    my ($in,$base,$out) = @_;
+    my ($seplinefound);
+
+    open (IN, "$in") || die "Cannot open $in for reading";
+    open (BASE, "$base" ) || die "Cannot open base file $base";
+    open (OUT, ">$out") || die "Cannot open tempfile $out";
+
+    while (<BASE>) {
+       print OUT;
+       if ($_ eq $sepline) {
+           $seplinefound = 1;
+           last;
+       }
+    }
+
+    print OUT $sepline if !$seplinefound;
+
+    my ($state) = 0;
+    while (<IN>) {
+
+       # Look for 'struct inode' definition
+       if ($state == 0) {
+           next unless m/^struct\s+inode\s*\{/;
+           $state++;
+           s/inode/vnode/;
+           # Fallthrough
+       }
+
+       # Look for 'union {' -- print otherwise
+       if ($state == 1) {
+           if (m/^\s*union\s*\{/) {
+               $state++;
+               print OUT "#ifdef notdef\n";
+           }
+           print OUT;
+           next;
+       }
+
+       # Look for the end of the union -- ignore otherwise
+       if ($state == 2) {
+           print OUT;
+           next unless (m/^\s+\}\s*u;/);
+           $state++;
+           print OUT "#endif /* notdef */\n";
+           next;
+       }
+
+       # Look for end brace -- print until we find it
+       if ($state == 3) {
+           print OUT;
+           if (m/^\s*\};/) { $state++ }
+       }
+    }
+
+    while (<BASE>) { print OUT; }
+
+    close (IN);
+    close (BASE);
+    close (OUT);
+}
+
+sub usage {
+    print "usage: $0 [-i linux_header_dir] [-o output_dir] [-h]\n";
+    exit 1;
+}
+
+sub testArg {
+    my ($arg) = @_;
+    return $arg if ($arg && $arg ne "");
+    usage;
+}
+
+while ($_ = shift @ARGV) {
+    if (m/^-i/) { $linux_header_dir = testArg(shift @ARGV); next; }
+    if (m/^-o/) { $outdir = testArg(shift @ARGV); next; }
+    usage;
+}
+
+$linux_fs_h="$linux_header_dir/include/linux/fs.h";
+$vfs_h="$outdir/osi_vfs.h";
+$vfs_hin="$outdir/osi_vfs.hin";
+
+makeVfs ($linux_fs_h, $vfs_hin, "$vfs_h.new");
+
+system ("cmp", "-s", $vfs_h, "$vfs_h.new");
+$exit_value = $? >> 8;
+$signal_num = $? & 127;
+$core_dump  = $? & 128;
+
+if ($exit_value == 0 || $signal_num > 0) {
+    unlink "$vfs_h.new";
+    print "nothing to do... $vfs_h not changed.\n"
+} else {
+    unlink "$vfs_h";
+    rename ("$vfs_h.new", $vfs_h);
+    print "wrote $vfs_h\n";
+}
+
+exit 0;
diff --git a/src/config/param.alpha_linux_24.h b/src/config/param.alpha_linux_24.h
new file mode 100644 (file)
index 0000000..ebb4e2e
--- /dev/null
@@ -0,0 +1,75 @@
+#ifndef _PARAM_ALPHA_LINUX_24_H_
+#define _PARAM_ALPHA_LINUX_24_H_
+
+/* Linux 2.2.16 kernel on Alpha with glibc 2.2 */
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously sparc64 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV        1
+#define AFS_LINUX22_ENV        1
+#define AFS_LINUX24_ENV     1
+#define AFS_ALPHA_LINUX20_ENV  1
+#define AFS_ALPHA_LINUX22_ENV  1
+#define AFS_ALPHA_LINUX24_ENV  1
+#define __alpha        1
+#define AFS_LINUX_64BIT_KERNEL 1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 338
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+
+#define AFS_64BIT_ENV          1       /* Defines afs_int32 as int, not long. */
+#define AFS_64BITPOINTER_ENV   1       /* pointers are 64 bits. */
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#undef CONFIG_SMP
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#define CONFIG_SMP
+#ifndef __SMP__
+#define __SMP__
+#endif
+#define AFS_GLOBAL_SUNLOCK
+#endif
+#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
+#define MODVERSIONS
+#include <linux/modversions.h>
+#endif
+#endif /* __KERNEL__  && !DUMP_KERNEL*/
+
+#include <afs/afs_sysnames.h>
+
+#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       "alpha_linux_24"
+#define SYS_NAME_ID    SYS_NAME_ID_alpha_linux_24
+#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 */
+
+#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 /* _PARAM_ALPHA_LINUX_24_H_ */
diff --git a/src/config/param.alpha_linux_24_usr.h b/src/config/param.alpha_linux_24_usr.h
new file mode 100644 (file)
index 0000000..3795484
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef _PARAM_ALPHA_LINUX_24_USR_H_
+#define _PARAM_ALPHA_LINUX_24_USR_H_
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously sparc64 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL                        1       /* user space kernel */
+#define AFS_ENV                        1
+#define AFS_USR_LINUX20_ENV    1
+#define AFS_USR_LINUX22_ENV    1
+#define AFS_USR_LINUX24_ENV    1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 338
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_64BIT_ENV       1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#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       "alpha_linux_24"
+#define SYS_NAME_ID    SYS_NAME_ID_alpha_linux_24
+#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
+
+#endif /* _PARAM_ALPHA_LINUX_24_USR_H_ */
diff --git a/src/config/param.parisc_linux24.h b/src/config/param.parisc_linux24.h
new file mode 100644 (file)
index 0000000..af619cc
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously ppc specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV        1
+#define AFS_LINUX22_ENV        1
+#define AFS_LINUX24_ENV        1
+#define AFS_PARISC_LINUX24_ENV    1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#undef CONFIG_SMP
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#define CONFIG_SMP
+#ifndef __SMP__
+#define __SMP__
+#endif
+#define AFS_GLOBAL_SUNLOCK
+#endif
+
+#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
+#define MODVERSIONS
+#include <linux/modversions.h>
+#endif
+#endif /* __KERNEL__  && !DUMP_KERNEL*/
+
+#include <afs/afs_sysnames.h>
+
+#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       "parisc_linux24"
+#define SYS_NAME_ID    SYS_NAME_ID_parisc_linux24
+#define AFSBIG_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 */
+
+#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 /* AFS_PARAM_H */
diff --git a/src/config/param.parisc_linux24_usr.h b/src/config/param.parisc_linux24_usr.h
new file mode 100644 (file)
index 0000000..56b37eb
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously ppc specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL                        1       /* user space kernel */
+#define AFS_ENV                        1
+#define AFS_USR_LINUX20_ENV    1
+#define AFS_USR_LINUX22_ENV    1
+#define AFS_USR_LINUX24_ENV    1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#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       "parisc_linux24"
+#define SYS_NAME_ID    SYS_NAME_ID_parisc_linux24
+#define AFSBIG_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
+
+#endif /* AFS_PARAM_H */
diff --git a/src/config/param.sun4x_59.h b/src/config/param.sun4x_59.h
new file mode 100644 (file)
index 0000000..60a07e5
--- /dev/null
@@ -0,0 +1,113 @@
+#ifndef        AFS_PARAM_H
+#define        AFS_PARAM_H
+
+#define AFS_VFS_ENV    1
+/* Used only in vfsck code; is it needed any more???? */
+
+#define AFS_VFSINCL_ENV        1       /* NOBODY uses this.... */
+#define AFS_GREEDY43_ENV       1       /* Used only in rx/rx_user.c */
+#define AFS_ENV                        1
+#define AFS_SUN_ENV            1
+#define AFS_SUN5_ENV           1
+#define        AFS_SUN52_ENV           1
+#define        AFS_SUN53_ENV           1
+#define        AFS_SUN54_ENV           1
+#define        AFS_SUN55_ENV           1
+#define        AFS_SUN56_ENV           1
+#define AFS_SUN57_ENV          1
+#define AFS_SUN58_ENV          1
+#define AFS_SUN59_ENV          1
+
+#define AFS_64BIT_ENV          1       /* Defines afs_int32 as int, not long. */
+
+#ifdef AFS_NAMEI_ENV
+#define AFS_64BIT_IOPS_ENV     1       /* needed for NAMEI... */
+#else /* AFS_NAMEI_ENV */
+#define AFS_3DISPARES           1       /* Utilize the 3 available disk inode 'spares' */
+#endif /* AFS_NAMEI_ENV */
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_GLOBAL_SUNLOCK     1       /* For global locking */
+#define RXK_LISTENER_ENV   1
+#define AFS_GCPAGS             1       /* if nonzero, garbage collect PAGs */
+
+#define        AFS_SYSCALL             65
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS   "afs"
+
+/* Machine / Operating system information */
+#define sys_sun4x_59   1
+#define SYS_NAME       "sun4x_59"
+#define SYS_NAME_ID    SYS_NAME_ID_sun4x_59
+#define AFSBIG_ENDIAN  1
+#define AFS_HAVE_FFS    1       /* Use system's ffs. */
+#define AFS_HAVE_VXFS  1       /* Support cache on Veritas vxfs file system */
+#define AFS_HAVE_STATVFS 1     /* System supports statvfs */
+#define AFS_VM_RDWR_ENV        1       /* read/write implemented via VM */
+#define AFS_USE_GETTIMEOFDAY 1  /* use gettimeofday to implement rx clock */
+
+#define NEARINODE_HINT  1   /* hint to ufs module to scatter inodes on disk*/
+#define nearInodeHash(volid, hval) {                                 \
+                unsigned char*  ts = (unsigned char*)&(volid)+sizeof(volid)-1;\
+                for ( (hval)=0; ts >= (unsigned char*)&(volid); ts--){\
+                    (hval) *= 173;                      \
+                    (hval) += *ts;                      \
+                }                                       \
+                }
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef KERNEL
+/* sun definitions here */
+#define        AFS_UIOFMODE            1       /* Only in afs/afs_vnodeops.c (afs_ustrategy) */
+#define        AFS_SYSVLOCK            1       /* sys v locking supported */
+/*#define      AFS_USEBUFFERS  1*/
+#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      UIO_SYSSPACE
+#define        AFS_UIOUSER     UIO_USERSPACE
+#define        AFS_CLBYTES     MCLBYTES
+#define        AFS_MINCHANGE   2
+#define        osi_GetTime(x)  uniqtime(x)
+
+/**
+  * These defines are for the 64 bit Solaris 7 port
+  * AFS_SYSCALL32 is used to protect the ILP32 syscall interface
+  * AFS_64BIT_ENV is for use of 64 bit inode numbers
+  */
+#if defined(__sparcv9)
+#define        AFS_SUN57_64BIT_ENV     1
+#define AFS_64BIT_INO          1
+#endif
+
+/**
+  * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
+  * use 32 bit quantities for time in afs, we now use uniqtime32
+  */
+#if defined(AFS_SUN57_64BIT_ENV)
+#undef osi_GetTime
+#define osi_GetTime(x)  uniqtime32(x)
+#endif
+
+
+
+#define        AFS_KALLOC(n)   kmem_alloc(n, KM_SLEEP)
+#define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
+#define        AFS_KFREE       kmem_free
+#define        VATTR_NULL      vattr_null
+#define memset(A, B, S) bzero(A, S)
+#define memcpy(B, A, S) bcopy(A, B, S)
+#define memcmp(A, B, S) bcmp(A, B, S)
+#endif /* KERNEL */
+#define        AFS_DIRENT      
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+#define        ROOTINO         UFSROOTINO
+
+#endif /* AFS_PARAM_H */
diff --git a/src/config/param.sun4x_59_usr.h b/src/config/param.sun4x_59_usr.h
new file mode 100644 (file)
index 0000000..3ce9e7d
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef        AFS_PARAM_H
+#define        AFS_PARAM_H
+
+#define AFS_VFS_ENV    1
+/* Used only in vfsck code; is it needed any more???? */
+#define RXK_LISTENER_ENV       1
+#define AFS_USERSPACE_IP_ADDR  1
+#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
+
+#define UKERNEL                        1       /* user space kernel */
+#define AFS_GREEDY43_ENV       1       /* Used only in rx/rx_user.c */
+#define AFS_ENV                        1
+#define AFS_USR_SUN5_ENV       1
+#define AFS_USR_SUN6_ENV       1
+#define AFS_USR_SUN7_ENV       1
+#define AFS_USR_SUN8_ENV       1
+#define AFS_USR_SUN9_ENV       1
+
+#define AFS_64BIT_ENV          1
+
+#include <afs/afs_sysnames.h>
+
+/*#define AFS_GLOBAL_SUNLOCK   1       /* For global locking */
+
+#define        AFS_3DISPARES           1       /* Utilize the 3 available disk inode 'spares' */
+#define        AFS_SYSCALL             65
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS   1
+
+/* Machine / Operating system information */
+#define sys_sun4x_59   1
+#define SYS_NAME       "sun4x_59"
+#define SYS_NAME_ID    SYS_NAME_ID_sun4x_59
+#define AFSBIG_ENDIAN  1
+#define AFS_HAVE_FFS            1       /* Use system's ffs. */
+#define AFS_HAVE_STATVFS      0       /* System doesn't support statvfs */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef KERNEL
+#define        AFS_UIOFMODE            1       /* Only in afs/afs_vnodeops.c (afs_ustrategy) */
+#define        AFS_SYSVLOCK            1       /* sys v locking supported */
+/*#define      AFS_USEBUFFERS  1*/
+#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
+#endif /* KERNEL */
+#define        AFS_DIRENT      
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+#define        ROOTINO         UFSROOTINO
+
+#endif /* AFS_PARAM_H */
diff --git a/src/des/conf-parisc-linux.h b/src/des/conf-parisc-linux.h
new file mode 100644 (file)
index 0000000..3d29372
--- /dev/null
@@ -0,0 +1,4 @@
+#define BITS32
+#define BIG
+#define MSBFIRST
+#define MUSTALIGN
diff --git a/src/venus/kdump.sh.linux b/src/venus/kdump.sh.linux
new file mode 100644 (file)
index 0000000..af40a22
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+# Copyright 2000, International Business Machines Corporation and others.
+# All Rights Reserved.
+# 
+# This software has been released under the terms of the IBM Public
+# License.  For details, see the LICENSE file in the top-level source
+# directory or online at http://www.openafs.org/dl/license10.html
+
+## Wrapper script for kdump on Linux.
+
+REL=`uname -r`
+DASH='-'
+exec $0${DASH}${REL} ${1+"$@"}
diff --git a/src/venus/livesys.c b/src/venus/livesys.c
new file mode 100644 (file)
index 0000000..f751716
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ * 
+ * This software has been released under the terms of the IBM Public
+ * License.  For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+
+#include <afsconfig.h>
+#include <afs/param.h>
+
+RCSID("$Header: /tmp/cvstemp/openafs/src/venus/livesys.c,v 1.1 2001/10/14 18:07:08 hartmans Exp $");
+
+#include <afs/afs_args.h>
+#include <rx/xdr.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <errno.h>
+#include <stdio.h>
+#include <netinet/in.h>
+#include <sys/stat.h>
+#include <afs/stds.h>
+#include <afs/vice.h>
+#include <afs/venus.h>
+#ifdef AFS_AIX32_ENV
+#include <signal.h>
+#endif
+#include <strings.h>
+
+#define        MAXSIZE 2048
+static char space[MAXSIZE];
+
+int main(argc, argv)
+    int argc;
+    char **argv;
+{
+    afs_int32 code;
+    struct ViceIoctl blob;
+    char *input = space;
+    afs_int32 setp = 0;
+
+#ifdef AFS_AIX32_ENV
+    /*
+     * The following signal action for AIX is necessary so that in case of a
+     * crash (i.e. core is generated) we can include the user's data section
+     * in the core dump. Unfortunately, by default, only a partial core is
+     * generated which, in many cases, isn't too useful.
+     */
+    struct sigaction nsa;
+
+    sigemptyset(&nsa.sa_mask);
+    nsa.sa_handler = SIG_DFL;
+    nsa.sa_flags = SA_FULLDUMP;
+    sigaction(SIGSEGV, &nsa, NULL);
+#endif
+
+    blob.in = space;
+    blob.out = space;
+    blob.out_size = MAXSIZE;
+    blob.in_size = sizeof(afs_int32);
+    memcpy(space, &setp, sizeof(afs_int32));
+    code = pioctl(0, VIOC_AFS_SYSNAME, &blob, 1);
+    if (code) {
+       fprintf(stderr, "livesys: %s\n", error_message(code));
+       return 1;
+    }
+    input = space;
+    memcpy(&setp, input, sizeof(afs_int32));
+    input += sizeof(afs_int32);
+    if (!setp) {
+       fprintf(stderr, "No sysname name value was found\n");
+       return 1;
+    }
+    printf("%s\n", input);
+    return 0;
+}