Index: openafs/src/afs/afs.h
diff -c openafs/src/afs/afs.h:1.48.2.3 openafs/src/afs/afs.h:1.48.2.4
*** openafs/src/afs/afs.h:1.48.2.3	Tue Nov  9 12:14:57 2004
--- openafs/src/afs/afs.h	Fri Dec 17 10:29:28 2004
***************
*** 43,49 ****
  #if     defined(AFS_HPUX102_ENV)
  #define AFS_FLOCK       k_flock
  #else
! #if     defined(AFS_SUN56_ENV) || (defined(AFS_LINUX24_ENV) && !defined(AFS_PPC64_LINUX26_ENV) && !defined(AFS_AMD64_LINUX26_ENV))
  #define AFS_FLOCK       flock64
  #else
  #define AFS_FLOCK       flock
--- 43,49 ----
  #if     defined(AFS_HPUX102_ENV)
  #define AFS_FLOCK       k_flock
  #else
! #if     defined(AFS_SUN56_ENV) || (defined(AFS_LINUX24_ENV) && !defined(AFS_PPC64_LINUX26_ENV) && !defined(AFS_AMD64_LINUX26_ENV) && !defined(AFS_IA64_LINUX26_ENV))
  #define AFS_FLOCK       flock64
  #else
  #define AFS_FLOCK       flock
Index: openafs/src/afs/LINUX/osi_module.c
diff -c openafs/src/afs/LINUX/osi_module.c:1.52.2.4 openafs/src/afs/LINUX/osi_module.c:1.52.2.5
*** openafs/src/afs/LINUX/osi_module.c:1.52.2.4	Tue Dec  7 01:12:13 2004
--- openafs/src/afs/LINUX/osi_module.c	Fri Dec 17 10:29:30 2004
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.4 2004/12/07 06:12:13 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.5 2004/12/17 15:29:30 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
***************
*** 182,188 ****
  static struct proc_dir_entry *openafs_procfs;
  
  static int
! afsproc_init()
  {
      struct proc_dir_entry *entry1;
      struct proc_dir_entry *entry2;
--- 182,188 ----
  static struct proc_dir_entry *openafs_procfs;
  
  static int
! afsproc_init(void)
  {
      struct proc_dir_entry *entry1;
      struct proc_dir_entry *entry2;
***************
*** 200,206 ****
  }
  
  static void
! afsproc_exit()
  {
      remove_proc_entry(PROC_CELLSERVDB_NAME, openafs_procfs);
      remove_proc_entry(PROC_SYSCALL_NAME, openafs_procfs);
--- 200,206 ----
  }
  
  static void
! afsproc_exit(void)
  {
      remove_proc_entry(PROC_CELLSERVDB_NAME, openafs_procfs);
      remove_proc_entry(PROC_SYSCALL_NAME, openafs_procfs);
***************
*** 233,241 ****
  {
      __asm__ __volatile__("alloc r42 = ar.pfs, 8, 3, 6, 0\n\t" "mov r41 = b0\n\t"	/* save rp */
  			 "mov out0 = in0\n\t" "mov out1 = in1\n\t" "mov out2 = in2\n\t" "mov out3 = in3\n\t" "mov out4 = in4\n\t" "mov out5 = gp\n\t"	/* save gp */
! 			 ";;\n" ".L1:    mov r3 = ip\n\t" ";;\n\t" "addl r15=.fptr_afs_syscall-.L1,r3\n\t" ";;\n\t" "ld8 r15=[r15]\n\t" ";;\n\t" "ld8 r16=[r15],8\n\t" ";;\n\t" "ld8 gp=[r15]\n\t" "mov b6=r16\n\t" "br.call.sptk.many b0 = b6\n\t" ";;\n\t" "mov ar.pfs = r42\n\t" "mov b0 = r41\n\t" "mov gp = r48\n\t"	/* restore gp */
  			 "br.ret.sptk.many b0\n" ".fptr_afs_syscall:\n\t"
! 			 "data8 @fptr(afs_syscall)");
  }
  
  asmlinkage long
--- 233,241 ----
  {
      __asm__ __volatile__("alloc r42 = ar.pfs, 8, 3, 6, 0\n\t" "mov r41 = b0\n\t"	/* save rp */
  			 "mov out0 = in0\n\t" "mov out1 = in1\n\t" "mov out2 = in2\n\t" "mov out3 = in3\n\t" "mov out4 = in4\n\t" "mov out5 = gp\n\t"	/* save gp */
! 			 ";;\n" ".L1:\n\t" "mov r3 = ip\n\t" ";;\n\t" "addl r15=.fptr_afs_syscall-.L1,r3\n\t" ";;\n\t" "ld8 r15=[r15]\n\t" ";;\n\t" "ld8 r16=[r15],8\n\t" ";;\n\t" "ld8 gp=[r15]\n\t" "mov b6=r16\n\t" "br.call.sptk.many b0 = b6\n\t" ";;\n\t" "mov ar.pfs = r42\n\t" "mov b0 = r41\n\t" "mov gp = r48\n\t"	/* restore gp */
  			 "br.ret.sptk.many b0\n" ".fptr_afs_syscall:\n\t"
! 			 "data8 @fptr(afs_syscall)\n\t" ".skip 8");
  }
  
  asmlinkage long
***************
*** 243,251 ****
  {
      __asm__ __volatile__("alloc r42 = ar.pfs, 8, 3, 6, 0\n\t" "mov r41 = b0\n\t"	/* save rp */
  			 "mov out0 = in0\n\t" "mov out1 = in1\n\t" "mov out2 = in2\n\t" "mov out3 = in3\n\t" "mov out4 = in4\n\t" "mov out5 = gp\n\t"	/* save gp */
! 			 ";;\n" ".L2:    mov r3 = ip\n\t" ";;\n\t" "addl r15=.fptr_afs_xsetgroups - .L2,r3\n\t" ";;\n\t" "ld8 r15=[r15]\n\t" ";;\n\t" "ld8 r16=[r15],8\n\t" ";;\n\t" "ld8 gp=[r15]\n\t" "mov b6=r16\n\t" "br.call.sptk.many b0 = b6\n\t" ";;\n\t" "mov ar.pfs = r42\n\t" "mov b0 = r41\n\t" "mov gp = r48\n\t"	/* restore gp */
  			 "br.ret.sptk.many b0\n" ".fptr_afs_xsetgroups:\n\t"
! 			 "data8 @fptr(afs_xsetgroups)");
  }
  
  struct fptr {
--- 243,251 ----
  {
      __asm__ __volatile__("alloc r42 = ar.pfs, 8, 3, 6, 0\n\t" "mov r41 = b0\n\t"	/* save rp */
  			 "mov out0 = in0\n\t" "mov out1 = in1\n\t" "mov out2 = in2\n\t" "mov out3 = in3\n\t" "mov out4 = in4\n\t" "mov out5 = gp\n\t"	/* save gp */
! 			 ";;\n" ".L2:\n\t" "mov r3 = ip\n\t" ";;\n\t" "addl r15=.fptr_afs_xsetgroups - .L2,r3\n\t" ";;\n\t" "ld8 r15=[r15]\n\t" ";;\n\t" "ld8 r16=[r15],8\n\t" ";;\n\t" "ld8 gp=[r15]\n\t" "mov b6=r16\n\t" "br.call.sptk.many b0 = b6\n\t" ";;\n\t" "mov ar.pfs = r42\n\t" "mov b0 = r41\n\t" "mov gp = r48\n\t"	/* restore gp */
  			 "br.ret.sptk.many b0\n" ".fptr_afs_xsetgroups:\n\t"
! 			 "data8 @fptr(afs_xsetgroups)\n\t" ".skip 8");
  }
  
  struct fptr {
Index: openafs/src/afs/LINUX/osi_prototypes.h
diff -c openafs/src/afs/LINUX/osi_prototypes.h:1.6.2.2 openafs/src/afs/LINUX/osi_prototypes.h:1.6.2.3
*** openafs/src/afs/LINUX/osi_prototypes.h:1.6.2.2	Tue Dec  7 01:12:13 2004
--- openafs/src/afs/LINUX/osi_prototypes.h	Fri Dec 17 10:29:30 2004
***************
*** 42,49 ****
  extern void check_bad_parent(struct dentry *dp);
  
  /* osi_sysctl.c */
! extern int osi_sysctl_init();
! extern void osi_sysctl_clean();
  
  /* osi_vm.c */
  extern int osi_VM_FlushVCache(struct vcache *avc, int *slept);
--- 42,49 ----
  extern void check_bad_parent(struct dentry *dp);
  
  /* osi_sysctl.c */
! extern int osi_sysctl_init(void);
! extern void osi_sysctl_clean(void);
  
  /* osi_vm.c */
  extern int osi_VM_FlushVCache(struct vcache *avc, int *slept);
Index: openafs/src/afs/LINUX/osi_vnodeops.c
diff -c openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.7 openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.8
*** openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.7	Mon Dec 13 14:35:35 2004
--- openafs/src/afs/LINUX/osi_vnodeops.c	Fri Dec 17 09:43:23 2004
***************
*** 22,28 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.7 2004/12/13 19:35:35 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
--- 22,28 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.8 2004/12/17 14:43:23 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 756,761 ****
--- 756,764 ----
    .mmap =	afs_linux_mmap,
    .open =	afs_linux_open,
    .flush =	afs_linux_flush,
+ #ifdef AFS_LINUX26_ENV
+   .sendfile =   generic_file_sendfile,
+ #endif
    .release =	afs_linux_release,
    .fsync =	afs_linux_fsync,
    .lock =	afs_linux_lock,
Index: openafs/src/afsd/afs.conf.linux
diff -c openafs/src/afsd/afs.conf.linux:1.7 openafs/src/afsd/afs.conf.linux:1.7.8.1
*** openafs/src/afsd/afs.conf.linux:1.7	Thu Jan 24 13:09:28 2002
--- openafs/src/afsd/afs.conf.linux	Fri Dec 17 10:13:40 2004
***************
*** 6,11 ****
--- 6,17 ----
  # License.  For details, see the LICENSE file in the top-level source
  # directory or online at http://www.openafs.org/dl/license10.html
  
+ ############################################################################
+ # On most linuces copy this file to
+ #        /etc/sysconfig/afs
+ # so afs.rc can use it as config file.
+ ############################################################################
+ 
  # Configuration information for AFS client
  
  # AFS_CLIENT and AFS_SERVER determine if we should start the client and or
***************
*** 17,30 ****
  # Dynroot support (dynamically generated /afs), respectively, should be
  # enabled in the AFS client.
  ENABLE_AFSDB=on
! ENABLE_DYNROOT=off
  
  # AFS client configuration options:
! XXLARGE="-stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
! XLARGE="-stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
! LARGE="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
! MEDIUM="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
! SMALL="-stat 300 -dcache 100 -daemons 2 -volumes 50"
  
  # cachesize and according options are set by /afs/rc.d/init.d/afs
  #   * if you set CACHESIZE to "AUTOMATIC", it will automatically be chosen
--- 23,71 ----
  # Dynroot support (dynamically generated /afs), respectively, should be
  # enabled in the AFS client.
  ENABLE_AFSDB=on
! ENABLE_DYNROOT=on
  
  # AFS client configuration options:
! # ---------------------------------------------------------------------------
! # possible AFS client afsd configuration options (from 1.3.74) are
! #      -blocks     The number of blocks available in the workstation cache.
! #      -files      The target number of files in the workstation cache (Default:
! #                  1000).
! #      -rootvol            The name of the root volume to use.
! #      -stat       The number of stat cache entries.
! #      -hosts      List of servers to check for volume location info FOR THE
! #                  HOME CELL.
! #      -memcache   Use an in-memory cache rather than disk.
! #      -cachedir    The base directory for the workstation cache.
! #      -mountdir   The directory on which the AFS is to be mounted.
! #      -confdir    The configuration directory .
! #      -nosettime  Don't keep checking the time to avoid drift.
! #      -verbose     Be chatty.
! #      -debug     Print out additional debugging info.
! #      -kerndev    [OBSOLETE] The kernel device for AFS.
! #      -dontfork   [OBSOLETE] Don't fork off as a new process.
! #      -daemons   The number of background daemons to start (Default: 2).
! #      -rmtsys    Also fires up an afs remote sys call (e.g. pioctl, setpag)
! #                 support daemon
! #      -chunksize [n]   2^n is the chunksize to be used.  0 is default.
! #      -dcache    The number of data cache entries.
! #      -biods     Number of bkg I/O daemons (AIX3.1 only)
! #      -prealloc  Number of preallocated "small" memory blocks
! #      -pininodes Number of inodes which can be spared from inode[] for
! #                 pointing at Vfiles.  If this is set too high, you may have
! #                 system problems, which can only be ameliorated by changing
! #                 NINODE (or equivalent) and rebuilding the kernel.
! #                 This option is now disabled.
! #      -logfile   Place where to put the logfile (default in <cache>/etc/AFSLog.
! #      -waitclose make close calls always synchronous (slows em down, tho)
! #      -files_per_subdir [n]   number of files per cache subdir. (def=2048)
! #      -shutdown  Shutdown afs daemons
! # ---------------------------------------------------------------------------
! XXLARGE="-fakestat -stat 4000 -dcache 4000 -daemons 6 -volumes 256 -files 50000"
! XLARGE="-fakestat -stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000"
! LARGE="-fakestat -stat 2800 -dcache 2400 -daemons 5 -volumes 128"
! MEDIUM="-fakestat -stat 2000 -dcache 800 -daemons 3 -volumes 70"
! SMALL="-fakestat -stat 300 -dcache 100 -daemons 2 -volumes 50"
  
  # cachesize and according options are set by /afs/rc.d/init.d/afs
  #   * if you set CACHESIZE to "AUTOMATIC", it will automatically be chosen
***************
*** 33,40 ****
  #     of options based on the cache size
  # otherwise the values specified here will be used. So be careful!
  # Note: if you leave these as-is, no changes are made.
! CACHESIZE=
! OPTIONS=$MEDIUM
  
  # you should never need to change these settings
  AFSDIR=/afs
--- 74,83 ----
  #     of options based on the cache size
  # otherwise the values specified here will be used. So be careful!
  # Note: if you leave these as-is, no changes are made.
! CACHESIZE=AUTOMATIC
! #CACHESIZE=50000
! OPTIONS=AUTOMATIC
! #OPTIONS=$SMALL
  
  # you should never need to change these settings
  AFSDIR=/afs
Index: openafs/src/afsd/afs.rc.linux
diff -c openafs/src/afsd/afs.rc.linux:1.9 openafs/src/afsd/afs.rc.linux:1.9.2.1
*** openafs/src/afsd/afs.rc.linux:1.9	Mon Apr 12 12:04:32 2004
--- openafs/src/afsd/afs.rc.linux	Fri Dec 17 10:13:40 2004
***************
*** 59,64 ****
--- 59,65 ----
  }
  
  SYSCNF=/etc/sysconfig/afs
+ KERNEL_VERSION=`uname -r`
  
  # Gather up options and post startup script name, if present
  if [ -f $SYSCNF ] ; then
***************
*** 104,112 ****
  	esac
  
  	# For now, just use uname -r to get the module version. 
! 	VERSION=`uname -r`
! 
! 	LIBAFS=libafs-$VERSION$MP.o
  }
  
  #
--- 105,118 ----
  	esac
  
  	# For now, just use uname -r to get the module version. 
! 	case $KERNEL_VERSION in
! 	  [1-2].[0-5].*)
! 		LIBAFS=libafs-$KERNEL_VERSION$MP.o
! 		;;
! 	  *)
! 		LIBAFS=libafs-$KERNEL_VERSION$MP.ko
! 		;;
! 	esac
  }
  
  #
***************
*** 117,124 ****
  # unregister_filesystem_Rsmp_b240cad8 is a typcial SMP version string from
  # a kernel built from ftp.kernel.org
  #
! 
! KSYMS_FILE=/proc/ksyms
  SEARCH_STR="unregister_filesystem"
  DEFAULT_SMP_PREFIX="smp_" # Redhat kernels need "smp" instead
  PREFIX="" # none needed for UP with <= 1Gig memory
--- 123,136 ----
  # unregister_filesystem_Rsmp_b240cad8 is a typcial SMP version string from
  # a kernel built from ftp.kernel.org
  #
! case $KERNEL_VERSION in
!   [1-2].[0-5].*)
! 	KSYMS_FILE=/proc/ksyms
! 	;;
!   *)
! 	KSYMS_FILE=/proc/kallsyms
! 	;;
! esac
  SEARCH_STR="unregister_filesystem"
  DEFAULT_SMP_PREFIX="smp_" # Redhat kernels need "smp" instead
  PREFIX="" # none needed for UP with <= 1Gig memory
***************
*** 129,136 ****
  	h8="$h$h$h$h$h$h$h$h"
  	prefix_set=0
  
! 	set X `fgrep $SEARCH_STR $KSYMS_FILE 2> /dev/null`; shift
! 	str=$2
  	case $str in
  	${SEARCH_STR}_R$h8)
  		# No prefix required
--- 141,156 ----
  	h8="$h$h$h$h$h$h$h$h"
  	prefix_set=0
  
! 	set X `egrep "\<$SEARCH_STR" $KSYMS_FILE 2> /dev/null`; shift
! 	
! 	case $KERNEL_VERSION in
! 	  [1-2].[0-5].*)
! 		str=$2
! 		;;
! 	  *)
! 		str=$3
! 		;;
! 	esac
  	case $str in
  	${SEARCH_STR}_R$h8)
  		# No prefix required
***************
*** 179,186 ****
  
  	if [ -f $KSYMS_FILE ]; then
  		# use the prefix command if required
! 		set_prefix
! 		/sbin/insmod ${PREFIX:+-P $PREFIX} -f -m $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
  	else
  		/sbin/insmod $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
  	fi
--- 199,213 ----
  
  	if [ -f $KSYMS_FILE ]; then
  		# use the prefix command if required
! 		case $KERNEL_VERSION in
! 		  [1-2].[0-5].*)
! 			set_prefix
! 			/sbin/insmod ${PREFIX:+-P $PREFIX} -f -m $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
! 			;;
! 		  *)
! 			/sbin/insmod $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
! 			;;
! 		esac
  	else
  		/sbin/insmod $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
  	fi
Index: openafs/src/aklog/aklog.1
diff -c /dev/null openafs/src/aklog/aklog.1:1.1.2.1
*** /dev/null	Fri Dec 17 10:50:22 2004
--- openafs/src/aklog/aklog.1	Fri Dec 17 10:39:45 2004
***************
*** 0 ****
--- 1,189 ----
+ .\" 
+ .\" $Id: aklog.1,v 1.1.2.1 2004/12/17 15:39:45 shadow Exp $
+ .\"
+ .\" Copyright 1990,1991 by the Massachusetts Institute of Technology
+ .\" For distribution and copying rights, see the file "mit-copyright.h"
+ .\"
+ .TH AKLOG 1 "August 1, 1990"
+ .UC 4
+ .SH NAME
+ aklog \- Obtain tokens for authentication to AFS
+ 
+ .SH SYNOPSIS
+ .B aklog 
+ [ 
+ .B \-d 
+ ] [ 
+ .B \-hosts
+ ] [ 
+ .B \-zsubs 
+ ] [ 
+ .B \-noprdb 
+ ] [ [
+ .B \-cell | \-c 
+ ] cell [
+ .B \-k 
+ kerberos-realm
+ ] ] [ [ 
+ .B \-path | \-p 
+ ] pathname ]
+ 
+ .SH DESCRIPTION
+ The 
+ .I aklog
+ program is used to authenticate to a cell or directory in 
+ .I AFS,
+ the Andrew Filesystem, by obtaining AFS 
+ .I tokens.  
+ Ordinarily, aklog is not used directly but called by
+ .IR attach (1).
+ 
+ If 
+ .I aklog
+ is invoked with no command line arguments, it will obtain tokens 
+ for the workstation's local cell.  It is possible to invoke
+ .I aklog
+ with arbitrarily many cells and pathnames
+ specified on the command line.  
+ .I aklog 
+ knows how to expand cell name abbreviations, so short
+ forms of cell names can be use used.  In addition, 
+ .I aklog
+ understands the following command line options:
+ 
+ .TP 4 
+ .B  \-cell | \-c \fRcell
+ This flag is not ordinarily necessary since 
+ .I aklog
+ can usually figure out when an argument is a cell.  It can be
+ used to introduce a cell name that would ordinarily be mistaken
+ for a path name if this should be required.  If this flag is
+ omitted, an argument will be treated as a cell name if it
+ contains no slashes (/) and is neither "." nor ".." .
+ 
+ .TP
+ .B \-k \fRkerberos-realm
+ This flag is valid only when immediately following the name of a
+ cell.  It is used to tell 
+ .I aklog
+ what kerberos realm should be used while authenticating to the
+ preceding cell.  This argument is unnecessary except when the
+ workstation is not properly configured.  Ordinarily, 
+ .I aklog
+ can determine this information on its own.
+ 
+ .TP
+ .B \-path | \-p \fRpathname
+ Like the \-cell flag, this flag is usually unnecessary.  When it
+ appears, the next command line argument is always treated as a
+ path name.  Ordinarily, an argument is treated as a path name
+ if it is "." or ".." or if it contains a slash (/).  
+ 
+ .TP
+ .B \-hosts
+ Prints all the server addresses which may act as a single point of
+ failure in accessing the specified directory path.  Each element of the
+ path is examined, and as new volumes are traversed, if they are not
+ replicated, the server's IP address containing the volume will be
+ displayed.
+ .IR Attach (1)
+ invokes 
+ .I aklog
+ with this option.  The output is of the form
+ 
+ host: 
+ .I IP address
+ 
+ .TP
+ .B \-zsubs
+ Causes the printing of the zephyr subscription information that a
+ person using a given path or cell would want.  
+ .IR Attach (1)
+ invokes 
+ .I aklog
+ with this option.  The output is of the form
+ 
+ zsub: 
+ .I instance
+ 
+ where 
+ .I instance
+ is the instance of a class filsrv zephyr subscription.
+ 
+ .TP
+ .B \-noprdb
+ Ordinarily, aklog looks up the AFS ID corresponding to the name
+ of the person invoking the command.  Specifying this flag turns
+ off this functionality.  This may be desirable if the protection
+ database is unavailable for some reason and tokens are desired
+ anyway.  
+ 
+ .TP
+ .B \-d
+ Turns on printing of debugging information.  This option is not
+ intended for general users.
+ 
+ .SH EXIT CODES
+ The exit status of
+ .I aklog
+ will be one of the following:
+ .TP 5
+ 0
+ Success -- No error occurred.
+ .TP 5
+ 1
+ Usage -- Bad command syntax; accompanied by a usage message.
+ .TP 5
+ 2
+ Something failed -- More than one cell or pathname was given on
+ the command line and at least one failure occurred.
+ A more specific error status is returned when only one directive
+ is given.
+ .TP 5
+ 3
+ AFS -- Unable to get AFS configuration or unable to get
+ information about a specific cell.
+ .TP 5
+ 4
+ Kerberos -- Unable to get tickets for authentication.
+ .TP 5
+ 5
+ Token -- Unable to get tokens.
+ .TP 5
+ 6
+ Bad pathname -- The path given was not a directory or 
+ .I lstat(2)
+ failed on some component of the pathname.
+ .TP 5
+ 7
+ Miscellaneous -- An internal failure occurred.  For example, 
+ .I aklog
+ returns this if it runs out of memory.
+ 
+ .SH EXAMPLES
+ .br
+ To get tokens for the local cell:
+ .br
+ % aklog
+ 
+ To get tokens for the athena.mit.edu cell:
+ .br
+ % aklog athena.mit.edu
+ .br
+ or
+ .br
+ % aklog athena
+ 
+ To get tokens adequate to read /afs/athena.mit.edu/user/p/potato:
+ .br
+ % aklog /afs/athena.mit.edu/user/p/potato
+ 
+ To get tokens for a test cell that is in a test Kerberos realm:
+ .br
+ % aklog testcell.mit.edu -k TESTREALM.MIT.EDU
+ 
+ .SH SEE ALSO
+ attach(1), tokens(1), unlog(1)
+ 
+ .SH AUTHOR
+ Emanuel Jay Berkenbilt (MIT-Project Athena)
Index: openafs/src/cf/osconf.m4
diff -c openafs/src/cf/osconf.m4:1.51.2.7 openafs/src/cf/osconf.m4:1.51.2.8
*** openafs/src/cf/osconf.m4:1.51.2.7	Tue Dec  7 01:08:42 2004
--- openafs/src/cf/osconf.m4	Fri Dec 17 10:29:25 2004
***************
*** 217,223 ****
  		YACC="bison -y"
  		;;
  
! 	ia64_linux24)
  		KERN_OPTMZ=-O2
  		LEX="flex -l"
  		MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
--- 217,223 ----
  		YACC="bison -y"
  		;;
  
! 	ia64_linux24|ia64_linux26)
  		KERN_OPTMZ=-O2
  		LEX="flex -l"
  		MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
Index: openafs/src/config/NTMakefile.i386_nt40
diff -c openafs/src/config/NTMakefile.i386_nt40:1.46.2.12 openafs/src/config/NTMakefile.i386_nt40:1.46.2.14
*** openafs/src/config/NTMakefile.i386_nt40:1.46.2.12	Wed Dec  8 04:12:09 2004
--- openafs/src/config/NTMakefile.i386_nt40	Thu Dec 16 15:07:20 2004
***************
*** 80,86 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=3
! AFSPRODUCT_VER_PATCH=7500
  AFSPRODUCT_VER_BUILD=0
  
  # For MSI installer, each major release should have a different GUID
--- 80,86 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=3
! AFSPRODUCT_VER_PATCH=7700
  AFSPRODUCT_VER_BUILD=0
  
  # For MSI installer, each major release should have a different GUID
Index: openafs/src/config/afs_sysnames.h
diff -c openafs/src/config/afs_sysnames.h:1.50.2.5 openafs/src/config/afs_sysnames.h:1.50.2.6
*** openafs/src/config/afs_sysnames.h:1.50.2.5	Tue Dec  7 01:08:46 2004
--- openafs/src/config/afs_sysnames.h	Fri Dec 17 10:29:27 2004
***************
*** 173,178 ****
--- 173,179 ----
  #define SYS_NAME_ID_ia64_linux2		2200
  #define SYS_NAME_ID_ia64_linux22	2201
  #define SYS_NAME_ID_ia64_linux24	2202
+ #define SYS_NAME_ID_ia64_linux26	2203
  
  #define SYS_NAME_ID_m68k_linux22        2301
  #define SYS_NAME_ID_m68k_linux24        2302
Index: openafs/src/config/param.ia64_linux26.h
diff -c /dev/null openafs/src/config/param.ia64_linux26.h:1.1.2.1
*** /dev/null	Fri Dec 17 10:50:22 2004
--- openafs/src/config/param.ia64_linux26.h	Fri Dec 17 10:29:27 2004
***************
*** 0 ****
--- 1,172 ----
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ /* 
+  * 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
+  */
+ 
+ 
+ #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 ia64 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_LINUX26_ENV	1
+ #define AFS_IA64_LINUX20_ENV	1
+ #define AFS_IA64_LINUX22_ENV	1
+ #define AFS_IA64_LINUX24_ENV	1
+ #define AFS_IA64_LINUX26_ENV	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 1141
+ #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_64BIT_CLIENT	1	
+ 
+ #define AFS_64BITPOINTER_ENV	1	/* pointers are 64 bits. */
+ 
+ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+ #include <linux/init.h>
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+ #include <linux/threads.h>
+ 
+ #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 1
+ #ifndef __SMP__
+ #define __SMP__
+ #endif
+ #define AFS_GLOBAL_SUNLOCK
+ #endif
+ 
+ #if defined(MODULE) && defined(CONFIG_MODVERSIONS)
+ #define MODVERSIONS
+ /* #include <config/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       2	/* Set to Userdisabled, allow sysctl to override */
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME	"ia64_linux26"
+ #define SYS_NAME_ID	SYS_NAME_ID_ia64_linux26
+ #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 */
+ 
+ #define USE_UCONTEXT		/* should be in afsconfig.h */
+ 
+ #endif /* _PARAM_IA64_LINUX20_H_ */
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ /* 
+  * 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
+  */
+ 
+ 
+ #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 i386 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_USR_LINUX26_ENV    1
+ #define AFS_NONFSTRANS 1
+ 
+ #define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+ #define AFS_SYSCALL 1141
+ #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	"ia64_linux26"
+ #define SYS_NAME_ID	SYS_NAME_ID_ia64_linux26
+ #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
+ 
+ #define USE_UCONTEXT		/* should be in afsconfig.h */
+ 
+ #endif /* AFS_PARAM_H */
+ 
+ #endif /* !defined(UKERNEL) */
Index: openafs/src/packaging/MacOS/OpenAFS.Info.plist
diff -c openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.2.2.3 openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.2.2.4
*** openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.2.2.3	Mon Dec 13 14:46:23 2004
--- openafs/src/packaging/MacOS/OpenAFS.Info.plist	Fri Dec 17 10:36:45 2004
***************
*** 3,15 ****
  <plist version="1.0">
  <dict>
  	<key>CFBundleGetInfoString</key>
! 	<string>OpenAFS 1.3.76</string>
  	<key>CFBundleIdentifier</key>
  	<string>org.openafs.OpenAFS.pkg</string>
  	<key>CFBundleName</key>
  	<string>OpenAFS</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.3.76</string>
  	<key>IFMajorVersion</key>
  	<integer>1</integer>
  	<key>IFMinorVersion</key>
--- 3,15 ----
  <plist version="1.0">
  <dict>
  	<key>CFBundleGetInfoString</key>
! 	<string>OpenAFS 1.3.77</string>
  	<key>CFBundleIdentifier</key>
  	<string>org.openafs.OpenAFS.pkg</string>
  	<key>CFBundleName</key>
  	<string>OpenAFS</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.3.77</string>
  	<key>IFMajorVersion</key>
  	<integer>1</integer>
  	<key>IFMinorVersion</key>
Index: openafs/src/packaging/MacOS/OpenAFS.info
diff -c openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.3 openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.4
*** openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.3	Mon Dec 13 14:46:23 2004
--- openafs/src/packaging/MacOS/OpenAFS.info	Fri Dec 17 10:36:45 2004
***************
*** 1,5 ****
  Title OpenAFS
! Version 1.3.76
  Description The OpenAFS distributed filesystem. This package installs an almost-ready-to-run client for OpenAFS. see http://www.openafs.org for more information.
  DefaultLocation /
  Diskname (null)
--- 1,5 ----
  Title OpenAFS
! Version 1.3.77
  Description The OpenAFS distributed filesystem. This package installs an almost-ready-to-run client for OpenAFS. see http://www.openafs.org for more information.
  DefaultLocation /
  Diskname (null)
Index: openafs/src/rx/rx_kcommon.h
diff -c openafs/src/rx/rx_kcommon.h:1.27.2.1 openafs/src/rx/rx_kcommon.h:1.27.2.2
*** openafs/src/rx/rx_kcommon.h:1.27.2.1	Wed Aug 25 03:10:41 2004
--- openafs/src/rx/rx_kcommon.h	Fri Dec 17 10:34:05 2004
***************
*** 19,25 ****
--- 19,27 ----
  #define _RX_KCOMMON_H_
  
  #ifdef AFS_LINUX22_ENV
+ #ifndef _LINUX_CODA_FS_I
  #define _LINUX_CODA_FS_I 1
+ #endif
  #define _CODA_HEADER_ 1
  struct coda_inode_info {
  };
Index: openafs/src/tests/dumptool.c
diff -c openafs/src/tests/dumptool.c:1.3 openafs/src/tests/dumptool.c:1.3.2.1
*** openafs/src/tests/dumptool.c:1.3	Tue Feb  3 00:31:52 2004
--- openafs/src/tests/dumptool.c	Fri Dec 17 09:39:31 2004
***************
*** 1,5 ****
  /*
!  * $Id: dumptool.c,v 1.3 2004/02/03 05:31:52 shadow Exp $
   *
   * dumptool - A tool to manage MR-AFS dump files
   *
--- 1,5 ----
  /*
!  * $Id: dumptool.c,v 1.3.2.1 2004/12/17 14:39:31 shadow Exp $
   *
   * dumptool - A tool to manage MR-AFS dump files
   *
***************
*** 238,244 ****
  struct vnodeData {
      struct VnodeDiskObject *vnode;	/* A pointer to the disk vnode */
      int vnodeNumber;		/* The vnode number */
!     long dumpdata;		/* File offset of dump data (if
  				 * available */
      unsigned char *filedata;	/* A pointer to the actual file
  				 * data itself (if available) */
--- 238,244 ----
  struct vnodeData {
      struct VnodeDiskObject *vnode;	/* A pointer to the disk vnode */
      int vnodeNumber;		/* The vnode number */
!     off64_t dumpdata;		/* File offset of dump data (if
  				 * available */
      unsigned char *filedata;	/* A pointer to the actual file
  				 * data itself (if available) */
***************
*** 308,314 ****
      unsigned int magic;
      struct DumpHeader dheader;
      VolumeDiskData vol;
!     long offset;
      int Res, Arg1, Arg2, Arg3, i;
      char *p;
      struct winsize win;
--- 308,314 ----
      unsigned int magic;
      struct DumpHeader dheader;
      VolumeDiskData vol;
!     off64_t offset;
      int Res, Arg1, Arg2, Arg3, i;
      char *p;
      struct winsize win;
***************
*** 500,513 ****
       * vnodes, the other to actually build the index.
       */
  
!     offset = ftell(f);
  
      if (ScanVnodes(f, &vol, 1)) {
  	fprintf(stderr, "First vnode scan failed, aborting\n");
  	exit(1);
      }
  
!     fseek(f, offset, SEEK_SET);
  
      if (ScanVnodes(f, &vol, 0)) {
  	fprintf(stderr, "Second vnode scan failed, aborting\n");
--- 500,513 ----
       * vnodes, the other to actually build the index.
       */
  
!     offset = ftello64(f);
  
      if (ScanVnodes(f, &vol, 1)) {
  	fprintf(stderr, "First vnode scan failed, aborting\n");
  	exit(1);
      }
  
!     fseeko64(f, offset, SEEK_SET);
  
      if (ScanVnodes(f, &vol, 0)) {
  	fprintf(stderr, "Second vnode scan failed, aborting\n");
***************
*** 883,889 ****
      int numDirVnodes = 0;
      unsigned char buf[SIZEOF_LARGEDISKVNODE];
      struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
!     long offset, oldoffset;
      struct vnodeData *vdata;
      unsigned int length;
  
--- 883,889 ----
      int numDirVnodes = 0;
      unsigned char buf[SIZEOF_LARGEDISKVNODE];
      struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
!     off64_t offset, oldoffset;
      struct vnodeData *vdata;
      unsigned int length;
  
***************
*** 1022,1029 ****
  		    return -1;
  		}
  		vnode->length = length;
! 		offset = ftell(f);
! 		fseek(f, length, SEEK_CUR);
  		break;
  	    default:
  		if (verbose)
--- 1022,1029 ----
  		    return -1;
  		}
  		vnode->length = length;
! 		offset = ftello64(f);
! 		fseeko64(f, length, SEEK_CUR);
  		break;
  	    default:
  		if (verbose)
***************
*** 1097,1104 ****
  		    return -1;
  		}
  
! 		oldoffset = ftell(f);
! 		fseek(f, offset, SEEK_SET);
  
  		if (fread(vdata->filedata, length, 1, f) != 1) {
  		    if (verbose)
--- 1097,1104 ----
  		    return -1;
  		}
  
! 		oldoffset = ftello64(f);
! 		fseeko64(f, offset, SEEK_SET);
  
  		if (fread(vdata->filedata, length, 1, f) != 1) {
  		    if (verbose)
***************
*** 1106,1112 ****
  		    return -1;
  		}
  
! 		fseek(f, oldoffset, SEEK_SET);
  	    } else if (vnode->type == vDirectory)
  		/*
  		 * Warn the user we may not have all directory
--- 1106,1112 ----
  		    return -1;
  		}
  
! 		fseeko64(f, oldoffset, SEEK_SET);
  	    } else if (vnode->type == vDirectory)
  		/*
  		 * Warn the user we may not have all directory
***************
*** 1150,1161 ****
   * Parsing the directory information is a pain, but other than that
   * we just use the other tools we already have in here.
   */
! 
  static void
  InteractiveRestore(FILE * f, VolumeDiskData * vol)
  {
      struct vnodeData *vdatacwd;	/* Vnode data for our current dir */
!     char cmdbuf[256];
      int argc;
      char **argv;
  
--- 1150,1161 ----
   * Parsing the directory information is a pain, but other than that
   * we just use the other tools we already have in here.
   */
! #define CMDBUFSIZE 	(AFSPATHMAX * 2)
  static void
  InteractiveRestore(FILE * f, VolumeDiskData * vol)
  {
      struct vnodeData *vdatacwd;	/* Vnode data for our current dir */
!     char cmdbuf[CMDBUFSIZE];
      int argc;
      char **argv;
  
***************
*** 1190,1196 ****
  		numNoDirData);
  
      printf("> ");
!     while (fgets(cmdbuf, 256, stdin)) {
  
  	cmdbuf[strlen(cmdbuf) - 1] = '\0';
  
--- 1190,1196 ----
  		numNoDirData);
  
      printf("> ");
!     while (fgets(cmdbuf, CMDBUFSIZE, stdin)) {
  
  	cmdbuf[strlen(cmdbuf) - 1] = '\0';
  
***************
*** 1550,1556 ****
  {
      struct vnodeData *vdata;
      FILE *out;
!     long cur = 0;
      int bytes, ret;
      char buffer[COPYBUFSIZE];
  
--- 1550,1556 ----
  {
      struct vnodeData *vdata;
      FILE *out;
!     off64_t cur = 0;
      int bytes, ret;
      char buffer[COPYBUFSIZE];
  
***************
*** 1572,1578 ****
  	return;
      }
  
!     if (fseek(f, vdata->dumpdata, SEEK_SET)) {
  	fprintf(stderr, "Seek failed: %s\n", strerror(errno));
  	fclose(out);
  	return;
--- 1572,1578 ----
  	return;
      }
  
!     if (fseeko64(f, vdata->dumpdata, SEEK_SET)) {
  	fprintf(stderr, "Seek failed: %s\n", strerror(errno));
  	fclose(out);
  	return;
***************
*** 1621,1627 ****
  {
      struct vnodeData *vdata;
      FILE *out;
!     long cur = 0;
      int bytes, ret;
      char buffer[COPYBUFSIZE];
      unsigned int vnode, uniquifier = 0;
--- 1621,1627 ----
  {
      struct vnodeData *vdata;
      FILE *out;
!     off64_t cur = 0;
      int bytes, ret;
      char buffer[COPYBUFSIZE];
      unsigned int vnode, uniquifier = 0;
***************
*** 1661,1667 ****
  	return;
      }
  
!     if (fseek(f, vdata->dumpdata, SEEK_SET)) {
  	fprintf(stderr, "Seek failed: %s\n", strerror(errno));
  	fclose(out);
  	return;
--- 1661,1667 ----
  	return;
      }
  
!     if (fseeko64(f, vdata->dumpdata, SEEK_SET)) {
  	fprintf(stderr, "Seek failed: %s\n", strerror(errno));
  	fclose(out);
  	return;
***************
*** 1960,1966 ****
      static char *largv[64];
      char **la = largv;
      char *s = string;
!     static char argbuf[256];
      char *ap = argbuf;
  
      *argc = 0;
--- 1960,1966 ----
      static char *largv[64];
      char **la = largv;
      char *s = string;
!     static char argbuf[CMDBUFSIZE];
      char *ap = argbuf;
  
      *argc = 0;
Index: openafs/src/util/afs_lhash.c
diff -c openafs/src/util/afs_lhash.c:1.9 openafs/src/util/afs_lhash.c:1.9.2.1
*** openafs/src/util/afs_lhash.c:1.9	Tue Jul 15 19:17:15 2003
--- openafs/src/util/afs_lhash.c	Fri Dec 17 10:29:31 2004
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/afs_lhash.c,v 1.9 2003/07/15 23:17:15 shadow Exp $");
  
  #include "afs_atomlist.h"
  #include "afs_lhash.h"
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/afs_lhash.c,v 1.9.2.1 2004/12/17 15:29:31 shadow Exp $");
  
  #include "afs_atomlist.h"
  #include "afs_lhash.h"
***************
*** 169,175 ****
      size_t old_address;		/* index of bucket to split */
      size_t new_address;		/* index of new bucket */
  
!     struct bucket *current;	/* for scanning down old chain */
      struct bucket *previous;
  
      struct bucket *last_of_new;	/* last element in new chain */
--- 169,175 ----
      size_t old_address;		/* index of bucket to split */
      size_t new_address;		/* index of new bucket */
  
!     struct bucket *current_b;	/* for scanning down old chain */
      struct bucket *previous;
  
      struct bucket *last_of_new;	/* last element in new chain */
***************
*** 206,241 ****
  
      /* relocate records to the new bucket */
  
!     current = lh->table[old_address];
      previous = 0;
      last_of_new = 0;
      lh->table[new_address] = 0;
  
!     while (current) {
  	size_t addr;
! 	addr = afs_lhash_address(lh, current->key);
  	if (addr == new_address) {
  	    /* attach it to the end of the new chain */
  	    if (last_of_new) {
! 		last_of_new->next = current;
  	    } else {
! 		lh->table[new_address] = current;
  	    }
  	    if (previous) {
! 		previous->next = current->next;
  	    } else {
! 		lh->table[old_address] = current->next;
  	    }
! 	    last_of_new = current;
! 	    current = current->next;
  	    last_of_new->next = 0;
  	} else {
  #ifdef CHECK_INVARIANTS
  	    assert(addr == old_address);
  #endif /* CHECK_INVARIANTS */
  	    /* leave it on the old chain */
! 	    previous = current;
! 	    current = current->next;
  	}
      }
  }
--- 206,241 ----
  
      /* relocate records to the new bucket */
  
!     current_b = lh->table[old_address];
      previous = 0;
      last_of_new = 0;
      lh->table[new_address] = 0;
  
!     while (current_b) {
  	size_t addr;
! 	addr = afs_lhash_address(lh, current_b->key);
  	if (addr == new_address) {
  	    /* attach it to the end of the new chain */
  	    if (last_of_new) {
! 		last_of_new->next = current_b;
  	    } else {
! 		lh->table[new_address] = current_b;
  	    }
  	    if (previous) {
! 		previous->next = current_b->next;
  	    } else {
! 		lh->table[old_address] = current_b->next;
  	    }
! 	    last_of_new = current_b;
! 	    current_b = current_b->next;
  	    last_of_new->next = 0;
  	} else {
  #ifdef CHECK_INVARIANTS
  	    assert(addr == old_address);
  #endif /* CHECK_INVARIANTS */
  	    /* leave it on the old chain */
! 	    previous = current_b;
! 	    current_b = current_b->next;
  	}
      }
  }
***************
*** 329,338 ****
  #endif /* CHECK_INVARIANTS */
  
      for (i = 0; i < lh->ltable; i++) {
! 	struct bucket *current;
  
! 	for (current = lh->table[i]; current; current = current->next) {
! 	    f(i, current->key, current->data);
  	}
      }
  }
--- 329,338 ----
  #endif /* CHECK_INVARIANTS */
  
      for (i = 0; i < lh->ltable; i++) {
! 	struct bucket *current_b;
  
! 	for (current_b = lh->table[i]; current_b; current_b = current_b->next) {
! 	    f(i, current_b->key, current_b->data);
  	}
      }
  }
***************
*** 342,356 ****
  {
      size_t k;
      struct bucket *previous;
!     struct bucket *current;
  
      lh->search_calls++;
  
      k = afs_lhash_address(lh, key);
!     for (previous = 0, current = lh->table[k]; current;
! 	 previous = current, current = current->next) {
  	lh->search_tests++;
! 	if (lh->equal(data, current->data)) {
  
  	    /*
  	     * Since we found what we were looking for, move
--- 342,356 ----
  {
      size_t k;
      struct bucket *previous;
!     struct bucket *current_b;
  
      lh->search_calls++;
  
      k = afs_lhash_address(lh, key);
!     for (previous = 0, current_b = lh->table[k]; current_b;
! 	 previous = current_b, current_b = current_b->next) {
  	lh->search_tests++;
! 	if (lh->equal(data, current_b->data)) {
  
  	    /*
  	     * Since we found what we were looking for, move
***************
*** 366,377 ****
  	     */
  
  	    if (previous) {
! 		previous->next = current->next;
! 		current->next = lh->table[k];
! 		lh->table[k] = current;
  	    }
  
! 	    return current->data;
  	}
      }
  
--- 366,377 ----
  	     */
  
  	    if (previous) {
! 		previous->next = current_b->next;
! 		current_b->next = lh->table[k];
! 		lh->table[k] = current_b;
  	    }
  
! 	    return current_b->data;
  	}
      }
  
***************
*** 382,393 ****
  afs_lhash_rosearch(const afs_lhash * lh, unsigned key, const void *data)
  {
      size_t k;
!     struct bucket *current;
  
      k = afs_lhash_address(lh, key);
!     for (current = lh->table[k]; current; current = current->next) {
! 	if (lh->equal(data, current->data)) {
! 	    return current->data;
  	}
      }
  
--- 382,393 ----
  afs_lhash_rosearch(const afs_lhash * lh, unsigned key, const void *data)
  {
      size_t k;
!     struct bucket *current_b;
  
      k = afs_lhash_address(lh, key);
!     for (current_b = lh->table[k]; current_b; current_b = current_b->next) {
! 	if (lh->equal(data, current_b->data)) {
! 	    return current_b->data;
  	}
      }
  
Index: openafs/src/venus/Makefile.in
diff -c openafs/src/venus/Makefile.in:1.30 openafs/src/venus/Makefile.in:1.30.2.1
*** openafs/src/venus/Makefile.in:1.30	Thu Jun 24 13:38:37 2004
--- openafs/src/venus/Makefile.in	Fri Dec 17 10:31:26 2004
***************
*** 286,292 ****
  		${INSTALL} -s kdump-alpha_linux-${LINUX_VERSION} $@ ;; \
  	*linux* ) \
  		${INSTALLex} -f ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
! 		${INSTALL} -s kdump-linux-${LINUX_VERSION} $@ ;; \
  	hp_ux11* ) \
  		${INSTALLex} -f ${srcdir}/kdump.sh.hp_ux11 ${DEST}/etc/kdump; \
  		${INSTALL} -s -f $? $@;; \
--- 286,292 ----
  		${INSTALL} -s kdump-alpha_linux-${LINUX_VERSION} $@ ;; \
  	*linux* ) \
  		${INSTALLex} -f ${srcdir}/kdump.sh.linux ${DEST}/etc/kdump; \
! 		${INSTALL} -s kdump-linux-${LINUX_VERSION} $@-${LINUX_VERSION} ;; \
  	hp_ux11* ) \
  		${INSTALLex} -f ${srcdir}/kdump.sh.hp_ux11 ${DEST}/etc/kdump; \
  		${INSTALL} -s -f $? $@;; \
Index: openafs/src/venus/kdump.c
diff -c openafs/src/venus/kdump.c:1.33 openafs/src/venus/kdump.c:1.33.2.1
*** openafs/src/venus/kdump.c:1.33	Tue Jul 13 01:49:54 2004
--- openafs/src/venus/kdump.c	Fri Dec 17 10:31:26 2004
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/kdump.c,v 1.33 2004/07/13 05:49:54 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/kdump.c,v 1.33.2.1 2004/12/17 15:31:26 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 244,250 ****
--- 244,252 ----
  #else
  #include "sys/vfs.h"
  #ifdef AFS_LINUX20_ENV
+ #ifndef UIO_MAXIOV
  #define UIO_MAXIOV 1		/* don't care */
+ #endif
  #if __GLIBC_MINOR__ == 0
  #include <iovec.h>
  #endif
***************
*** 257,262 ****
--- 259,267 ----
  #undef ULONG_MAX
  #define _LINUX_TIME_H
  #define _LINUX_FCNTL_H
+ #ifdef AFS_IA64_LINUX24_ENV
+ #define flock64  flock
+ #endif /* AFS_IA64_LINUX24_ENV */
  #ifdef AFS_S390_LINUX20_ENV
  #define _S390_STATFS_H
  #else
***************
*** 294,299 ****
--- 299,314 ----
  #define timer_t ktimer_t
  #define timer_t_redefined
  #endif
+ #ifdef AFS_LINUX26_ENV
+ /* For some reason, this doesn't get defined in linux/types.h
+    if __KERNEL_STRICT_NAMES is defined. But the definition of
+    struct inode uses it.
+ */
+ #ifndef HAVE_SECTOR_T
+ /* got it from linux/types.h */
+ typedef unsigned long sector_t;
+ #endif /* HAVE_SECTOR_T */
+ #endif /* AFS_LINUX26_ENV */
  #include <linux/version.h>
  #include <linux/fs.h>
  #include <osi_vfs.h>
***************
*** 647,653 ****
--- 662,672 ----
  #define MAXNAMELEN 64
  typedef struct symlist {
      char s_name[MAXNAMELEN];
+ #ifdef AFS_LINUX_64BIT_KERNEL
+     unsigned long s_value;
+ #else
      int s_value;
+ #endif /* AFS_LINUX_64BIT_KERNEL */
  } symlist_t;
  
  #define KSYM_ALLOC_STEP 128
***************
*** 701,707 ****
--- 720,730 ----
  		exit(1);
  	    }
  	}
+ #ifdef AFS_LINUX_64BIT_KERNEL
+ 	ksyms[nksyms].s_value = (unsigned long)strtoul(line, &p, 16);
+ #else
  	ksyms[nksyms].s_value = (int)strtoul(line, &p, 16);
+ #endif /* AFS_LINUX_64BIT_KERNEL */
  	p++;
  #ifdef AFS_LINUX26_ENV
  	/* Linux 2.6 /proc/kallsyms has a one-char symbol type
***************
*** 728,734 ****
--- 751,761 ----
  
  
  /* find_symbol returns 0 if not found, otherwise value for symbol */
+ #ifdef AFS_LINUX_64BIT_KERNEL
+ unsigned long
+ #else
  int
+ #endif /* AFS_LINUX_64BIT_KERNEL */
  find_symbol(char *name)
  {
      symlist_t *tmp;
***************
*** 1906,1912 ****
--- 1933,1943 ----
      findsym("afs_linux_memlist", &symoff);
      kread(kmem, symoff, (char *)&memp, sizeof memp);
      if (memp) {
+ #ifdef AFS_LINUX_64BIT_KERNEL
+ 	kread(kmem, (unsigned long)memp, (char *)&next, sizeof next);
+ #else
  	kread(kmem, (int)memp, (char *)&next, sizeof next);
+ #endif /* AFS_LINUX_64BIT_KERNEL */
      } else {
  	memset(&next, 0, sizeof next);
      }
