dest_only_libafs: all dest_dirs
$(MAKE) build TARGET=libafs COMPILE_PART2B=dest
+packages: dest
+ @case ${SYS_NAME} in \
+ ppc_darwin* ) \
+ ${COMPILE_PART1} packaging/MacOS && sh ./buildpkg.sh ${DEST} ;; \
+ hp_ux110 ) \
+ ${COMPILE_PART1} packaging/HP-UX && swpackage -s psf-1.2.10-transarc-paths-11.00 ;; \
+ hp_ux11i ) \
+ ${COMPILE_PART1} packaging/HP-UX && swpackage -s psf-1.2.10-transarc-paths-11.11 ;; \
+ ia64_hpux1122 ) \
+ ${COMPILE_PART1} packaging/HP-UX && swpackage -s psf-1.2.10-transarc-paths-11.22 ;; \
+ *) \
+ echo Not building packages for ${SYS_NAME} ;; \
+ esac
+
${TOP_INCDIR} ${TOP_INCDIR}/afs ${TOP_LIBDIR}:
mkdir -p $@
cmd: comerr
@case ${SYS_NAME} in \
- sgi_6* | sun4x_57 | sun4x_58 | hp_ux11* | sparc64_linux* | alpha_linux* ) \
+ sgi_6* | sun4x_5[789] | hp_ux11* | ia64_hpux* | sparc64_linux* | alpha_linux* ) \
${COMPILE_PART1} cmd ${COMPILE_PART2}64 ;; \
*) \
${COMPILE_PART1} cmd ${COMPILE_PART2} ;; \
tviced: project viced vlserver libafsrpc libafsauthent
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux110) \
+ alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \
*) \
echo Not building MT viced for ${SYS_NAME} ;; \
gtx: project null auth # kauth rxkad ?
case ${SYS_NAME} in \
- rs_aix* | sun*_5? | sgi_6? | *linux* | ppc_darwin* | *fbsd*) \
+ rs_aix* | sun*_5? | sgi_6? | *linux* | ppc_darwin* | *fbsd* | ia64_hpux*) \
$(RM) -f ${TOP_LIBDIR}/libtermlib.a; \
ln -s libnull.a ${TOP_LIBDIR}/libtermlib.a; \
${COMPILE_PART1} gtx ${COMPILE_PART2};; \
vfsck: vol
set -x; \
case ${SYS_NAME} in \
- sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | *fbsd* | *_obsd* | sun*_4* ) \
+ sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | ia64_hpux* | *fbsd* | *_obsd* | sun*_4* ) \
echo skip vfsck for ${SYS_NAME} ;; \
* ) \
${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \
${COMPILE_PART1} login ${COMPILE_PART2} ;; \
parisc_linux24) \
echo Skipping pam/login for parisc_linux24 ;; \
- sun*_* | hp_ux11* | *linux* | *fbsd* ) \
- ${COMPILE_PART1} pam ${COMPILE_PART2} ;; \
+ amd64_linux24) \
+ echo Skipping pam/login for amd64_linux24 ;; \
+ sun*_* | hp_ux11* | ia64_hpux* | *linux* | *fbsd* ) \
+ if test "@HAVE_PAM@" = "yes"; then \
+ ${COMPILE_PART1} pam ${COMPILE_PART2} ; \
+ else \
+ echo Skipping pam for ${SYS_NAME} ; \
+ fi ;; \
ppc_darwin* | *_obsd* ) \
echo Skipping login for ${SYS_NAME} ;; \
* ) \
tbutc: project bubasics butm budb bucoord cmd butc
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun*_*|rs_aix4*|*linux*|hp_ux110) \
+ alpha_dux*|sgi_*|sun*_*|rs_aix4*|*linux*|hp_ux11*|ia64_hpux*) \
${COMPILE_PART1} tbutc ${COMPILE_PART2} ;; \
*) \
echo Not building MT butc for ${SYS_NAME} ;; \
# pthread based user space RX library
libafsrpc: rx rxkad des
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux110|*fbsd*) \
+ alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*) \
${COMPILE_PART1} libafsrpc ${COMPILE_PART2} ;; \
*) \
echo Not building MT libafsrpc for ${SYS_NAME} ;; \
libafsauthent: ubik auth kauth libafsrpc
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux110|*fbsd*) \
+ alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*) \
${COMPILE_PART1} libafsauthent ${COMPILE_PART2} ;; \
*) \
echo Not building MT libafsrpc for ${SYS_NAME} ;; \
shlibafsrpc: rx rxkad des
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux110) \
+ amd64_linux24) \
+ echo Skipping shlibafsprc for amd64_linux24 ;; \
+ alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
${COMPILE_PART1} shlibafsrpc ${COMPILE_PART2} ;; \
*) \
echo Not building shared libafsrpc for ${SYS_NAME} ;; \
shlibafsauthent: ubik auth kauth shlibafsrpc
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux110) \
+ amd64_linux24) \
+ echo Skipping shlibafsauthent for amd64_linux24 ;; \
+ alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \
*) \
echo Not building shared libafsrpc for ${SYS_NAME} ;; \
libadmin: libafsauthent bozo
case ${SYS_NAME} in \
- alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux110) \
+ alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
$(MAKE) libadmin_real ;; \
*) \
echo Not building MT libadmin for ${SYS_NAME} ;; \
-OpenAFS News -- history of user-visible changes. April 10, 2003.
+OpenAFS News -- history of user-visible changes. July 29, 2003.
+
+* Changes incorporated in OpenAFS 1.2.10
+
+** dumps to and restores from large files now supported by butc.
+
+** Linux on AMD Opteron (sysname amd64_linux24), HP-UX 11i on PA-RISC
+ (sysname hp_ux11i), HP-UX 11.22 on Intel Itanium (sysname ia64_hpux1122),
+ and User Mode Linux i386 (sysnames i386_umlinux22, i386_umlinux24) now
+ supported.
+
+** Windows Largeint support (for VC7)
+
+** afsd will not shut itself down while /afs is mounted, to preclude panics.
+
+** On Linux 2.4, the AFS cache cannot be unmounted if afsd is not shut down.
+ This is consistent with the behavior of other platforms and of Linux 2.2,
+ but until now Linux 2.4 had not behaved this way.
+
+** Restore behavior pre-1.2.9 of adding cell aliases we find using AFSDB
+ for cells that have been statically configured via CellServDB.
+
+** MacOS X client fakes mode bits so host does not preclude user access to
+ data incorrectly.
+
+** MacOS X client enables disk arbitration such that AFS shows up immediately
+ in Finder, and precludes afs unmount unless force is used, to prevent
+ Finder from "ejecting" it. AFS can also be mounted multiple times
+ on the MacOS X client.
* Changes incorporated in OpenAFS 1.2.9
** Solaris 9 12/02 is now supported. Solaris 7 and 8 x86 should now
work again.
+** On Linux machines using 2.2 series kernels, 2.2.19 or higher is now
+ required.
+
+** An OpenAFS 1.2.9 afsd will not work with kernel modules built from
+ an earlier OpenAFS release. In general, using a mismatched afsd and
+ kernel modules set is unsupported; it is not recommended that you use
+ such a configuration on a regular basis.
+
* Changes incorporated in OpenAFS 1.2.8
** Mountpoint directory information is now only faked for cross-cell
AC_CANONICAL_HOST
SRCDIR_PARENT=`pwd`
-#BOZO_SAVE_CORES BOS_RESTRICTED_MODE BOS_NEW_CONFIG pam sia
+#BOZO_SAVE_CORES pam sia
AC_ARG_WITH(afs-sysname,
[ --with-afs-sysname=sys use sys for the afs sysname]
)
[ --disable-afsdb disable AFSDB RR support],, enable_afsdb="yes")
AC_ARG_ENABLE( bos-restricted-mode,
[ --enable-bos-restricted-mode enable bosserver restricted mode which disables certain bosserver functionality],, enable_bos_restricted_mode="no")
+AC_ARG_ENABLE( bos-new-config,
+[ --enable-bos-new-config enable bosserver pickup of BosConfig.new on restarts],, enable_bos_new_config="no")
AC_ARG_ENABLE( namei-fileserver,
[ --enable-namei-fileserver force compilation of namei fileserver in preference to inode fileserver],, enable_namei_fileserver="no")
AC_ARG_ENABLE( fast-restart,
LINUX_EXPORTS_TASKLIST_LOCK
LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
+ LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM
LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
LINUX_INODE_SETATTR_RETURN_TYPE
+ LINUX_KERNEL_LINUX_SYSCALL_H
LINUX_NEED_RHCONFIG
LINUX_RECALC_SIGPENDING_ARG_TYPE
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT
if test "x$ac_cv_linux_config_modversions" = "xno"; then
AC_MSG_WARN([Cannot determine sys_call_table status. assuming it's exported])
ac_cv_linux_exports_sys_call_table=yes
+ if test -f "$LINUX_KERNEL_PATH/include/asm/ia32_unistd.h"; then
+ ac_cv_linux_exports_ia32_sys_call_table=yes
+ fi
else
LINUX_EXPORTS_INIT_MM
LINUX_EXPORTS_KALLSYMS_ADDRESS
LINUX_EXPORTS_KALLSYMS_SYMBOL
LINUX_EXPORTS_SYS_CALL_TABLE
+ LINUX_EXPORTS_IA32_SYS_CALL_TABLE
LINUX_EXPORTS_SYS_CHDIR
LINUX_EXPORTS_SYS_CLOSE
+ LINUX_EXPORTS_SYS_WAIT4
if test "x$ac_cv_linux_exports_sys_call_table" = "xno"; then
linux_syscall_method=none
if test "x$ac_cv_linux_exports_init_mm" = "xyes"; then
if test "x$linux_syscall_method" = "xnone"; then
AC_MSG_ERROR([no available sys_call_table access method])
fi
- if test "x$ac_cv_linux_exports_sys_chdir" = "xyes" ; then
- AC_DEFINE(EXPORTED_SYS_CHDIR, 1, [define if your linux kernel exports sys_chdir])
- fi
- if test "x$ac_cv_linux_exports_sys_close" = "xyes" ; then
- AC_DEFINE(EXPORTED_SYS_CLOSE, 1, [define if your linux kernel exports sys_close])
- fi
fi
fi
+ if test "x$ac_cv_linux_exports_sys_chdir" = "xyes" ; then
+ AC_DEFINE(EXPORTED_SYS_CHDIR, 1, [define if your linux kernel exports sys_chdir])
+ fi
+ if test "x$ac_cv_linux_exports_sys_close" = "xyes" ; then
+ AC_DEFINE(EXPORTED_SYS_CLOSE, 1, [define if your linux kernel exports sys_close])
+ fi
+ if test "x$ac_cv_linux_exports_sys_wait4" = "xyes" ; then
+ AC_DEFINE(EXPORTED_SYS_WAIT4, 1, [define if your linux kernel exports sys_wait4])
+ fi
if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
AC_DEFINE(EXPORTED_TASKLIST_LOCK, 1, [define if your linux kernel exports tasklist_lock])
fi
if test "x$ac_cv_linux_exports_sys_call_table" = "xyes"; then
AC_DEFINE(EXPORTED_SYS_CALL_TABLE)
fi
+ if test "x$ac_cv_linux_exports_ia32_sys_call_table" = "xyes"; then
+ AC_DEFINE(EXPORTED_IA32_SYS_CALL_TABLE)
+ fi
if test "x$ac_cv_linux_exports_kallsyms_symbol" = "xyes"; then
AC_DEFINE(EXPORTED_KALLSYMS_SYMBOL)
fi
if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then
AC_DEFINE(STRUCT_INODE_HAS_I_TRUNCATE_SEM, 1, [define if your struct inode has truncate_sem])
fi
+ if test "x$ac_cv_linux_fs_struct_inode_has_i_alloc_sem" = "xyes"; then
+ AC_DEFINE(STRUCT_INODE_HAS_I_ALLOC_SEM, 1, [define if your struct inode has alloc_sem])
+ fi
if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then
AC_DEFINE(STRUCT_INODE_HAS_I_DEVICES, 1, [define if you struct inode has i_devices])
fi
if test "x$ac_cv_linux_func_recalc_sigpending_takes_void" = "xyes"; then
AC_DEFINE(RECALC_SIGPENDING_TAKES_VOID, 1, [define if your recalc_sigpending takes void])
fi
+ if test "x$ac_linux_syscall" = "xyes" ; then
+ AC_DEFINE(HAVE_KERNEL_LINUX_SYSCALL_H, 1, [define if your linux kernel has linux/syscall.h])
+ fi
if test "x$ac_cv_linux_sched_struct_task_struct_has_parent" = "xyes"; then
AC_DEFINE(STRUCT_TASK_STRUCT_HAS_PARENT, 1, [define if your struct task_struct has parent])
fi
i?86-*-freebsd4.6*)
AFS_SYSNAME="i386_fbsd_46"
;;
- hppa*-hp-hpux11*)
+ hppa*-hp-hpux11.0*)
AFS_SYSNAME="hp_ux110"
;;
+ hppa*-hp-hpux11.11)
+ AFS_SYSNAME="hp_ux11i"
+ ;;
+ ia64-hp-hpux*)
+ AFS_SYSNAME="ia64_hpux1122"
+ ;;
hppa*-hp-hpux10*)
AFS_SYSNAME="hp_ux102"
;;
power*-ibm-aix4.3*)
AFS_SYSNAME="rs_aix42"
;;
+ x86_64-*-linux-gnu)
+ AFS_SYSNAME="amd64_linuxXX"
+ ;;
*)
AC_MSG_ERROR(An AFS sysname is required)
exit 1
fi
_AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
AFS_SYSNAME="$_AFS_SYSNAME"
+ if test -f "$LINUX_KERNEL_PATH/include/linux/autoconf.h"; then
+ AFS_ISUML=`awk '$[]2 == "CONFIG_USERMODE"{print $[]3}' $LINUX_KERNEL_PATH/include/linux/autoconf.h`
+ if test "x${AFS_ISUML}" = "x1"; then
+ _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/linux/umlinux/`
+ fi
+ AFS_SYSNAME="$_AFS_SYSNAME"
+ fi
;;
esac
AC_MSG_RESULT($AFS_SYSNAME)
fi
+# KDUMP64 defaults to KDUMP for systems without a separate kdump64
+KDUMP64='${KDUMP}'
+KDUMP=kdump
+case $AFS_SYSNAME in
+ sgi_6?)
+ KDUMP=kdump.IP20;;
+ sun4x_5[789] | hp_ux11*)
+ KDUMP=kdump32
+ KDUMP64=kdump64;;
+ *linux*)
+ KDUMP='kdump-${LINUX_VERSION}';;
+esac
+AC_SUBST(KDUMP)
+AC_SUBST(KDUMP64)
+
case $AFS_SYSNAME in
*_darwin*)
DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
done
fi
- AC_CHECK_FUNCS(res_search)
+ openafs_save_libs="$LIBS"
+ AC_MSG_CHECKING([for res_search])
+ AC_FUNC_RES_SEARCH
+
if test "$ac_cv_func_res_search" = no; then
- for lib in dns nsl resolv; do
- if test "$HAVE_RES_SEARCH" != 1; then
- AC_CHECK_LIB(${lib}, res_search, LIBS="$LIBS -l$lib";HAVE_RES_SEARCH=1;AC_DEFINE(HAVE_RES_SEARCH, 1, [define if you have res_search]))
- fi
- done
- if test "$HAVE_RES_SEARCH" = 1; then
- LIB_res_search="-l$lib"
- fi
- fi
+ for lib in dns nsl resolv; do
+ if test "$ac_cv_func_res_search" != yes; then
+ LIBS="-l$lib $LIBS"
+ AC_FUNC_RES_SEARCH
+ LIBS="$openafs_save_libs"
+ fi
+ done
+ if test "$ac_cv_func_res_search" = yes; then
+ LIB_res_search="-l$lib"
+ AC_DEFINE(HAVE_RES_SEARCH, 1, [])
+ AC_MSG_RESULT([yes, in lib$lib])
+ else
+ AC_MSG_RESULT(no)
+ fi
+ else
+ AC_DEFINE(HAVE_RES_SEARCH, 1, [])
+ AC_MSG_RESULT(yes)
+ fi
+
fi
PTHREAD_LIBS=error
AC_DEFINE(BOS_RESTRICTED_MODE, 1, [define if you want to want bos restricted mode])
fi
+if test "$enable_bos_new_config" = "yes"; then
+ AC_DEFINE(BOS_NEW_CONFIG, 1, [define if you want to enable automatic renaming of BosConfig.new to BosConfig at startup])
+fi
+
if test "$enable_namei_fileserver" = "yes"; then
AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
fi
AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h)
AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h ucontext.h)
+if test "$ac_cv_header_security_pam_modules_h" = "yes"; then
+ HAVE_PAM="yes"
+else
+ HAVE_PAM="no"
+fi
+AC_SUBST(HAVE_PAM)
+
AC_CHECK_FUNCS(utimes random srandom getdtablesize snprintf re_comp re_exec)
-AC_CHECK_FUNCS(setprogname getprogname sigaction)
+AC_CHECK_FUNCS(setprogname getprogname sigaction mkstemp strerror)
AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_FUNCS(timegm)
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_file.c,v 1.7 2001/09/11 15:47:36 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_file.c,v 1.8 2003/07/30 17:23:43 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
if (code || tstat.size <= asize) return code;
MObtainWriteLock(&afs_xosi,321);
AFS_GUNLOCK();
+#ifdef STRUCT_INODE_HAS_I_ALLOC_SEM
+ down_write(&inode->i_alloc_sem);
+#endif
down(&inode->i_sem);
inode->i_size = newattrs.ia_size = asize;
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
#endif
code = -code;
up(&inode->i_sem);
+#ifdef STRUCT_INODE_HAS_I_ALLOC_SEM
+ up_write(&inode->i_alloc_sem);
+#endif
AFS_GLOCK();
MReleaseWriteLock(&afs_xosi);
return code;
size_t resid;
register afs_int32 code;
AFS_STATCNT(osi_Write);
- if ( !afile )
- osi_Panic("afs_osi_Write called with null param");
+ if ( !afile ) {
+ if ( !afs_shuttingdown )
+ osi_Panic("afs_osi_Write called with null param");
+ else
+ return EIO;
+ }
if (offset != -1) afile->offset = offset;
AFS_GUNLOCK();
code = osi_rdwr(UIO_WRITE, afile, (caddr_t)aptr, asize, &resid);
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_misc.c,v 1.13 2003/04/13 19:32:22 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_misc.c,v 1.14 2003/07/30 17:23:43 hartmans Exp $");
#include "../afs/sysincludes.h"
#include "../afs/afsincludes.h"
char *crash_addr = 0; /* Induce an oops by writing here. */
+#if defined(AFS_LINUX24_ENV)
/* Lookup name and return vnode for same. */
-int osi_lookupname(char *aname, uio_seg_t seg, int followlink,
- vnode_t **dirvpp, struct dentry **dpp)
+int osi_lookupname_internal(char *aname, uio_seg_t seg, int followlink,
+ vnode_t **dirvpp, struct dentry **dpp,
+ struct nameidata *nd)
{
-#if defined(AFS_LINUX24_ENV)
- struct nameidata nd;
-#else
- struct dentry *dp = NULL;
-#endif
int code;
code = ENOENT;
-#if defined(AFS_LINUX24_ENV)
if (seg == AFS_UIOUSER) {
code = followlink ?
- user_path_walk(aname, &nd) : user_path_walk_link(aname, &nd);
+ user_path_walk(aname, nd) : user_path_walk_link(aname, nd);
}
else {
- if (path_init(aname, followlink ? LOOKUP_FOLLOW : 0, &nd))
- code = path_walk(aname, &nd);
+ if (path_init(aname, followlink ? LOOKUP_FOLLOW : 0, nd))
+ code = path_walk(aname, nd);
}
if (!code) {
- if (nd.dentry->d_inode) {
- *dpp = dget(nd.dentry);
+ if (nd->dentry->d_inode) {
+ *dpp = dget(nd->dentry);
code = 0;
- } else
+ } else {
code = ENOENT;
- path_release(&nd);
+ path_release(nd);
+ }
}
+ return code;
+}
+#endif
+
+int osi_lookupname(char *aname, uio_seg_t seg, int followlink,
+ vnode_t **dirvpp, struct dentry **dpp)
+{
+#if defined(AFS_LINUX24_ENV)
+ struct nameidata nd;
+ int code = osi_lookupname_internal(aname, seg, followlink, dirvpp, dpp,
+ &nd);
+ if (!code)
+ path_release(&nd);
+
+ return (code);
#else
+ struct dentry *dp = NULL;
+ int code;
+
+ code = ENOENT;
if (seg == AFS_UIOUSER) {
dp = followlink ? namei(aname) : lnamei(aname);
}
else
dput(dp);
}
-#endif
return code;
+#endif
}
/* Intialize cache device info and fragment size for disk cache partition. */
extern struct osi_dev cacheDev;
extern afs_int32 afs_fsfragsize;
extern struct super_block *afs_cacheSBp;
+ extern struct nameidata afs_cacheNd;
- code = osi_lookupname(aname, AFS_UIOSYS, 1, NULL, &dp);
+ code = osi_lookupname_internal(aname, AFS_UIOSYS, 1, NULL, &dp,
+ &afs_cacheNd);
if (code) return ENOENT;
cacheInode = dp->d_inode->i_ino;
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_module.c,v 1.11 2003/04/13 19:32:22 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/LINUX/osi_module.c,v 1.12 2003/07/30 17:23:43 hartmans Exp $");
#include "../afs/sysincludes.h"
#include "../afs/afsincludes.h"
#include "../h/unistd.h" /* For syscall numbers. */
#include "../h/mm.h"
+#ifdef AFS_AMD64_LINUX20_ENV
+#include "../asm/ia32_unistd.h"
+#endif
+
#include <linux/module.h>
#include <linux/slab.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
#include <linux/init.h>
#include <linux/sched.h>
#endif
-#ifndef EXPORTED_SYS_CALL_TABLE
+#if !defined(EXPORTED_SYS_CALL_TABLE) && defined(HAVE_KERNEL_LINUX_SYSCALL_H)
#include <linux/syscall.h>
#endif
-
#ifdef AFS_SPARC64_LINUX24_ENV
#define __NR_setgroups32 82 /* This number is not exported for some bizarre reason. */
#endif
static void* afs_ni_syscall = 0;
#endif
+#ifdef AFS_AMD64_LINUX20_ENV
+#ifdef EXPORTED_IA32_SYS_CALL_TABLE
+extern void * ia32_sys_call_table[];
+#else
+static void **ia32_sys_call_table;
+#endif
+
+static void *ia32_ni_syscall = 0;
+asmlinkage long (*sys32_setgroupsp)(int gidsetsize, old_gid_t *grouplist);
+#if defined(__NR_ia32_setgroups32)
+asmlinkage long (*sys32_setgroups32p)(int gidsetsize, gid_t *grouplist);
+#endif /* __NR_ia32_setgroups32 */
+#endif /* AFS_AMD64_LINUX20_ENV */
+
#ifdef AFS_SPARC64_LINUX20_ENV
static unsigned int afs_ni_syscall32 = 0;
asmlinkage int (*sys32_setgroupsp)(int gidsetsize, __kernel_gid_t32 *grouplist);
#if defined(__NR_setgroups32)
asmlinkage int (*sys32_setgroups32p)(int gidsetsize, __kernel_gid_t32 *grouplist);
-#endif
+#endif /* __NR_setgroups32 */
#ifdef EXPORTED_SYS_CALL_TABLE
extern unsigned int sys_call_table32[];
-#else
+#else /* EXPORTED_SYS_CALL_TABLE */
static unsigned int *sys_call_table32;
-#endif
+#endif /* EXPORTED_SYS_CALL_TABLE */
asmlinkage int afs_syscall32(long syscall, long parm1, long parm2, long parm3,
long parm4, long parm5)
"ret\n\t"
"nop");
}
-#endif
+#endif /* AFS_SPARC64_LINUX20_ENV */
#ifdef AFS_IA64_LINUX20_ENV
#ifdef AFS_LINUX24_ENV
asmlinkage int (*sys_setgroups32p)(int gidsetsize, __kernel_gid32_t *grouplist);
-#endif
+#endif /* AFS_LINUX24_ENV */
#ifdef AFS_SPARC64_LINUX20_ENV
#define POINTER2SYSCALL (unsigned int)(unsigned long)
extern long afs_xsetgroups();
#if defined(__NR_setgroups32)
extern int afs_xsetgroups32();
-#endif
-#ifdef AFS_SPARC64_LINUX20_ENV
+#endif /* __NR_setgroups32 */
+#if defined(AFS_SPARC64_LINUX20_ENV) || defined (AFS_AMD64_LINUX20_ENV)
extern int afs32_xsetgroups();
-#if defined(__NR_setgroups32)
+#if (defined(__NR_setgroups32) && defined(AFS_SPARC64_LINUX20_ENV))
extern int afs32_xsetgroups32();
#endif
+#if (defined(__NR_ia32_setgroups32) && defined(AFS_AMD64_LINUX20_ENV))
+ extern int afs32_xsetgroups32();
#endif
+#endif /* AFS_SPARC64_LINUX20_ENV || AFS_AMD64_LINUX20_ENV */
-#ifndef EXPORTED_SYS_CALL_TABLE
+#if !defined(EXPORTED_SYS_CALL_TABLE) || (defined(AFS_AMD64_LINUX20_ENV) && !defined(EXPORTED_IA32_SYS_CALL_TABLE))
unsigned long *ptr;
unsigned long offset;
unsigned long datalen;
char *sym_name;
unsigned long sym_start;
unsigned long sym_end;
-#endif
+#endif /* EXPORTED_SYS_CALL_TABLE */
RWLOCK_INIT(&afs_xosi, "afs_xosi");
printf("afs: Unable to obtain PAGE_OFFSET. Exiting..");
return -EIO;
}
-#endif
+#endif /* AFS_S390_LINUX22_ENV */
#ifndef EXPORTED_SYS_CALL_TABLE
sys_call_table=0;
#if defined(AFS_IA64_LINUX20_ENV)
ptr = (unsigned long *) (&sys_close - 0x180000);
datalen=0x180000/sizeof(ptr);
+#else
+#if defined(AFS_AMD64_LINUX20_ENV)
+ ptr=(unsigned long *)&init_mm;
+ datalen=0x360000/sizeof(ptr);
#else
ptr=(unsigned long *)&init_mm;
datalen=16384;
#endif
+#endif
#endif
for (offset=0;offset <datalen;ptr++,offset++) {
#if defined(AFS_IA64_LINUX20_ENV)
break;
}
#else
+#if defined(EXPORTED_SYS_WAIT4) && defined(EXPORTED_SYS_CLOSE)
+ if (ptr[0] == (unsigned long)&sys_close &&
+ ptr[__NR_wait4 - __NR_close] == (unsigned long)&sys_wait4) {
+ sys_call_table=ptr - __NR_close;
+ break;
+ }
+#else
#if defined(EXPORTED_SYS_CHDIR) && defined(EXPORTED_SYS_CLOSE)
if (ptr[0] == (unsigned long)&sys_close &&
ptr[__NR_chdir - __NR_close] == (unsigned long)&sys_chdir) {
break;
}
#endif
+#endif
#endif
}
#ifdef EXPORTED_KALLSYMS_ADDRESS
#endif
#endif /* SYS_CALL_TABLE */
+#ifdef AFS_AMD64_LINUX20_ENV
+#ifndef EXPORTED_IA32_SYS_CALL_TABLE
+ ia32_sys_call_table=0;
+#ifdef EXPORTED_KALLSYMS_SYMBOL
+ ret=1;
+ token=0;
+ while (ret) {
+ sym_start=0;
+ ret=kallsyms_symbol_to_address("ia32_sys_call_table", &token,
+ &mod_name, &mod_start, &mod_end,
+ &sec_name, &sec_start, &sec_end,
+ &sym_name, &sym_start, &sym_end);
+ if (ret && !strcmp(mod_name, "kernel"))
+ break;
+ }
+ if (ret && sym_start) {
+ ia32_sys_call_table=sym_start;
+ }
+#else /* EXPORTED_KALLSYMS_SYMBOL */
+#ifdef EXPORTED_KALLSYMS_ADDRESS
+ ret=kallsyms_address_to_symbol((unsigned long)&sys_close, &mod_name,
+ &mod_start, &mod_end, &sec_name, &sec_start, &sec_end,
+ &sym_name, &sym_start, &sym_end);
+ ptr=(unsigned long *)sec_start;
+ datalen=(sec_end-sec_start)/sizeof(unsigned long);
+#else /* EXPORTED_KALLSYMS_ADDRESS */
+#if defined(AFS_IA64_LINUX20_ENV)
+ ptr = (unsigned long *) (&sys_close - 0x180000);
+ datalen=0x180000/sizeof(ptr);
+#else /* AFS_IA64_LINUX20_ENV */
+#if defined(AFS_AMD64_LINUX20_ENV)
+ ptr=(unsigned long *)&interruptible_sleep_on;
+ datalen=0x180000/sizeof(ptr);
+#else /* AFS_AMD64_LINUX20_ENV */
+ ptr=(unsigned long *)&interruptible_sleep_on;
+ datalen=16384;
+#endif /* AFS_AMD64_LINUX20_ENV */
+#endif /* AFS_IA64_LINUX20_ENV */
+#endif /* EXPORTED_KALLSYMS_ADDRESS */
+ for (offset=0;offset <datalen;ptr++,offset++) {
+ if (ptr[0] == (unsigned long)&sys_exit &&
+ ptr[__NR_ia32_open - __NR_ia32_exit] == (unsigned long)&sys_open) {
+ ia32_sys_call_table=ptr - __NR_ia32_exit;
+ break;
+ }
+ }
+#ifdef EXPORTED_KALLSYMS_ADDRESS
+ ret=kallsyms_address_to_symbol((unsigned long)ia32_sys_call_table,
+ &mod_name, &mod_start, &mod_end, &sec_name,
+ &sec_start, &sec_end,
+ &sym_name, &sym_start, &sym_end);
+ if (ret && strcmp(sym_name, "ia32_sys_call_table"))
+ ia32_sys_call_table=0;
+#endif /* EXPORTED_KALLSYMS_ADDRESS */
+#endif /* EXPORTED_KALLSYMS_SYMBOL */
+ if (!ia32_sys_call_table) {
+ printf("Warning: Failed to find address of ia32_sys_call_table\n");
+ } else {
+ printf("Found ia32_sys_call_table at %x\n", ia32_sys_call_table);
+ }
+#else
+ printf("Found ia32_sys_call_table at %x\n", ia32_sys_call_table);
+#endif /* IA32_SYS_CALL_TABLE */
+#endif
+
/* Initialize pointers to kernel syscalls. */
#if defined(AFS_IA64_LINUX20_ENV)
kernel_gp = ((struct fptr *)printk)->gp;
sys_call_table32[__NR_afs_syscall] = POINTER2SYSCALL afs_syscall32;
# endif
#endif /* AFS_IA64_LINUX20_ENV */
+#ifdef AFS_AMD64_LINUX20_ENV
+ if (ia32_sys_call_table) {
+ ia32_ni_syscall = ia32_sys_call_table[__NR_ia32_afs_syscall];
+ ia32_sys_call_table[__NR_ia32_afs_syscall] = POINTER2SYSCALL afs_syscall;
+ }
+#endif
osi_Init();
register_filesystem(&afs_file_system);
#else /* AFS_IA64_LINUX20_ENV */
sys_setgroupsp = SYSCALL2POINTER sys_call_table[__NR_setgroups];
sys_call_table[__NR_setgroups] = POINTER2SYSCALL afs_xsetgroups;
-# ifdef AFS_SPARC64_LINUX20_ENV
+#ifdef AFS_SPARC64_LINUX20_ENV
sys32_setgroupsp = SYSCALL2POINTER sys_call_table32[__NR_setgroups];
sys_call_table32[__NR_setgroups] = POINTER2SYSCALL afs32_xsetgroups;
-# endif
-# if defined(__NR_setgroups32)
+#endif /* AFS_SPARC64_LINUX20_ENV */
+#if defined(__NR_setgroups32)
sys_setgroups32p = SYSCALL2POINTER sys_call_table[__NR_setgroups32];
sys_call_table[__NR_setgroups32] = POINTER2SYSCALL afs_xsetgroups32;
-# ifdef AFS_SPARC64_LINUX20_ENV
+#ifdef AFS_SPARC64_LINUX20_ENV
sys32_setgroups32p = SYSCALL2POINTER sys_call_table32[__NR_setgroups32];
sys_call_table32[__NR_setgroups32] = POINTER2SYSCALL afs32_xsetgroups32;
-# endif
-# endif
+#endif /* AFS_SPARC64_LINUX20_ENV */
+#endif /* __NR_setgroups32 */
+#ifdef AFS_AMD64_LINUX20_ENV
+ if (ia32_sys_call_table) {
+ sys32_setgroupsp =
+ SYSCALL2POINTER ia32_sys_call_table[__NR_ia32_setgroups];
+ ia32_sys_call_table[__NR_ia32_setgroups] =
+ POINTER2SYSCALL afs32_xsetgroups;
+#if defined(__NR_ia32_setgroups32)
+ sys32_setgroups32p =
+ SYSCALL2POINTER ia32_sys_call_table[__NR_ia32_setgroups32];
+ ia32_sys_call_table[__NR_ia32_setgroups32] =
+ POINTER2SYSCALL afs32_xsetgroups32;
+#endif /* __NR_ia32_setgroups32 */
+ }
+#endif /* AFS_AMD64_LINUX20_ENV */
#endif /* AFS_IA64_LINUX20_ENV */
osi_sysctl_init();
# endif
# endif
#endif /* AFS_IA64_LINUX20_ENV */
+#ifdef AFS_AMD64_LINUX20_ENV
+ if (ia32_sys_call_table) {
+ ia32_sys_call_table[__NR_ia32_setgroups] =
+ POINTER2SYSCALL sys32_setgroupsp;
+ ia32_sys_call_table[__NR_ia32_afs_syscall] =
+ POINTER2SYSCALL ia32_ni_syscall;
+# if defined(__NR_setgroups32)
+ ia32_sys_call_table[__NR_ia32_setgroups32] =
+ POINTER2SYSCALL sys32_setgroups32p;
+#endif
+ }
+#endif
unregister_filesystem(&afs_file_system);
osi_linux_free_inode_pages(); /* Invalidate all pages using AFS inodes. */
static long get_page_offset(void)
{
-#if defined(AFS_PPC_LINUX22_ENV) || defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV) || defined(AFS_ALPHA_LINUX20_ENV) || defined(AFS_S390_LINUX22_ENV) || defined(AFS_IA64_LINUX20_ENV) || defined(AFS_PARISC_LINUX24_ENV)
+#if defined(AFS_PPC_LINUX22_ENV) || defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV) || defined(AFS_ALPHA_LINUX20_ENV) || defined(AFS_S390_LINUX22_ENV) || defined(AFS_IA64_LINUX20_ENV) || defined(AFS_PARISC_LINUX24_ENV) || defined(AFS_AMD64_LINUX20_ENV)
return PAGE_OFFSET;
#else
struct task_struct *p, *q;
SYS_NAME=@AFS_SYSNAME@
SHELL=/bin/sh
-KERNELDIR = ../libafs/
-UKERNELDIR = ../libuafs/
+KERNELDIR = ../libafs
+UKERNELDIR = ../libuafs
include ../config/Makefile.${SYS_NAME}
${INSTALL} longc_procs.h ${TOP_INCDIR}/afs ;; \
esac
+kinstall: ${KERNELDIR}/afs AFS_component_version_number.c afs_trace.h afszcm.cat
+ -chmod 666 ${KERNELDIR}/afs/*
+ ${INSTALL} *.[csh] ${KERNELDIR}/afs
+ ${INSTALL} VNOPS/*.[csh] ${KERNELDIR}/afs
+ ${INSTALL} ${AFS_OSTYPE}/*.[csh] ${KERNELDIR}/afs
+
+afs_trace.h: afs_trace.et
+ ${COMPILE_ET} -v 2 afs_trace.et
+
# NOTE: linux case uses --new as well to work around bug in some versions of
# gencat.
-kinstall: ${KERNELDIR}/afs AFS_component_version_number.c
- -chmod 666 ${KERNELDIR}afs/*
- ${COMPILE_ET} -v 2 afs_trace.et
- ${INSTALL} *.[csh] ${KERNELDIR}afs
- ${INSTALL} VNOPS/*.[csh] ${KERNELDIR}afs
- ${INSTALL} ${AFS_OSTYPE}/*.[csh] ${KERNELDIR}afs
+afszcm.cat: afs_trace.msf
-$(RM) -f afszcm.cat
case ${SYS_NAME} in \
sgi_* ) \
gencat -m afszcm.cat afs_trace.msf ;; \
sun*_4* ) \
/usr/etc/gencat afszcm.cat afs_trace.msf ;; \
- *_linux* ) \
+ *_linux* | *_umlinux* ) \
gencat --new afszcm.cat afs_trace.msf ;; \
ppc_darwin* | i386_fbsd*) \
echo No gencat for ${SYS_NAME} ;; \
${KERNELDIR}/afs:
mkdir -p $@
-ukinstall: ${UKERNELDIR}/afs AFS_component_version_number.c
- -chmod 666 ${UKERNELDIR}afs/*
- ${COMPILE_ET} -v 2 afs_trace.et
- ${INSTALL} *.[csh] ${UKERNELDIR}afs
- ${INSTALL} VNOPS/*.[csh] ${UKERNELDIR}afs
- ${INSTALL} UKERNEL/*.[csh] ${UKERNELDIR}afs
+ukinstall: ${UKERNELDIR}/afs AFS_component_version_number.c afs_trace.h
+ -chmod 666 ${UKERNELDIR}/afs/*
+ ${INSTALL} *.[csh] ${UKERNELDIR}/afs
+ ${INSTALL} VNOPS/*.[csh] ${UKERNELDIR}/afs
+ ${INSTALL} UKERNEL/*.[csh] ${UKERNELDIR}/afs
${UKERNELDIR}/afs:
mkdir -p $@
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_readdir.c,v 1.10 2002/12/11 03:00:39 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_readdir.c,v 1.11 2003/07/30 17:23:44 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
#include "../afs/nfsclient.h"
#include "../afs/afs_osidnlc.h"
+#if defined(AFS_HPUX1122_ENV)
+#define DIRPAD 7
+#else
+#define DIRPAD 3
+#endif
/**
* A few definitions. This is until we have a proper header file
u_short d_reclen;
u_short d_namlen;
};
-#define NDIRSIZ_LEN(len) ((sizeof (struct dirent)+4 - (MAXNAMLEN+1)) + (((len)+1 + 3) &~ 3))
+#define NDIRSIZ_LEN(len) ((sizeof (struct dirent)+4 - (MAXNAMLEN+1)) + (((len)+1 + DIRPAD) &~ DIRPAD))
#endif
#endif /* !defined(UKERNEL) */
*/
#if defined(AFS_HPUX100_ENV)
#define DIRSIZ_LEN(len) \
- ((sizeof (struct __dirent) - (_MAXNAMLEN+1)) + (((len)+1 + 3) &~ 3))
+ ((sizeof (struct __dirent) - (_MAXNAMLEN+1)) + (((len)+1 + DIRPAD) &~ DIRPAD))
#else
#if defined(AFS_SUN56_ENV)
#define DIRSIZ_LEN(len) ((18 + (len) + 1 + 7) & ~7 )
/* pad out the remaining characters with zeros */
if (code == 0) {
- AFS_UIOMOVE(bufofzeros, ((slen + 4) & ~3) - slen, UIO_READ,
+ AFS_UIOMOVE(bufofzeros, ((slen + 1 + DIRPAD) & ~DIRPAD) - slen, UIO_READ,
auio, code);
}
AFS_MOVE_LOCK();
AFS_UIOMOVE(ode->name, o_slen, UIO_READ, auio, code);
/* pad out the remaining characters with zeros */
if (code == 0) {
- AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen, UIO_READ, auio, code);
+ AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen, UIO_READ, auio, code);
}
/* pad out the difference between rlen and slen... */
if (DIRSIZ_LEN(o_slen) < rlen) {
AFS_UIOMOVE(ode->name, o_slen, UIO_READ, auio, code);
/* pad out the remaining characters with zeros */
if (code == 0) {
- AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen, UIO_READ, auio, code);
+ AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen, UIO_READ, auio, code);
}
/* pad out the difference between rlen and slen... */
if (DIRSIZ_LEN(o_slen) < rlen) {
AFS_UIOMOVE(ode->name, o_slen, UIO_READ, auio, code);
/* pad out the remaining characters with zeros */
if (code == 0) {
- AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen,
+ AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen,
UIO_READ, auio, code);
}
/* pad out the difference between rlen and slen... */
}
/* pad out the remaining characters with zeros */
if (code == 0) {
- AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen, UIO_READ, auio, code);
+ AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen, UIO_READ, auio, code);
}
/* pad out the difference between rlen and slen... */
if (NDIRSIZ_LEN(o_slen) < rlen) {
AFS_UIOMOVE(ode->name, o_slen, UIO_READ, auio, code);
/* pad out the remaining characters with zeros */
if (code == 0) {
- AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen, UIO_READ, auio, code);
+ AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen, UIO_READ, auio, code);
}
/* pad out the difference between rlen and slen... */
if (NDIRSIZ_LEN(o_slen) < rlen) {
AFS_UIOMOVE(ode->name, o_slen, UIO_READ, auio, code);
/* pad out the remaining characters with zeros */
if (code == 0) {
- AFS_UIOMOVE(bufofzeros, ((o_slen + 4) & ~3) - o_slen, UIO_READ, auio, code);
+ AFS_UIOMOVE(bufofzeros, ((o_slen + 1 + DIRPAD) & ~DIRPAD) - o_slen, UIO_READ, auio, code);
}
/* pad out the difference between rlen and slen... */
if (NDIRSIZ_LEN(o_slen) < rlen) {
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_call.c,v 1.15 2003/04/13 19:32:22 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_call.c,v 1.16 2003/07/30 17:23:42 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
#endif
afs_cold_shutdown = 0;
if (parm == 1) afs_cold_shutdown = 1;
- if (afs_globalVFS != 0)
- afs_warn("AFS isn't unmounted yet!\n");
-
- afs_shutdown();
+#ifndef AFS_DARWIN_ENV
+ if (afs_globalVFS != 0) {
+ afs_warn("AFS isn't unmounted yet! Call aborted\n");
+ code = EACCES;
+ } else
+#endif
+ afs_shutdown();
}
#if ! defined(AFS_HPUX90_ENV) || defined(AFS_HPUX100_ENV)
#ifdef AFS_SPARC64_LINUX24_ENV
if (current->thread.flags & SPARC_FLAG_32BIT)
-#elif AFS_SPARC64_LINUX20_ENV
+#elif defined(AFS_SPARC64_LINUX20_ENV)
if (current->tss.flags & SPARC_FLAG_32BIT)
+#elif defined(AFS_AMD64_LINUX20_ENV)
+ if (current->thread.flags & THREAD_IA32)
#else
#error Not done for this linux version
-#endif /* AFS_SPARC64_LINUX20_ENV */
+#endif
{
AFS_COPYIN(cmarg, (caddr_t) &dst32, sizeof dst32, code);
if (!code)
long parm6; /* not actually used - should be removed */
};
/* Linux system calls only set up for 5 arguments. */
-asmlinkage int afs_syscall(long syscall, long parm1, long parm2, long parm3,
+asmlinkage long afs_syscall(long syscall, long parm1, long parm2, long parm3,
long parm4)
{
struct afssysargs args, *uap = &args;
#include <afsconfig.h>
#include "../afs/param.h"
-RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_pioctl.c,v 1.16 2003/04/13 19:32:22 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_pioctl.c,v 1.17 2003/07/30 17:23:43 hartmans Exp $");
#include "../afs/sysincludes.h" /* Standard vendor system headers */
#include "../afs/afsincludes.h" /* Afs-based standard headers */
}
#endif /* defined(AFS_SGI_ENV) && (_MIPS_SZLONG==64) */
-#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV)
+#if defined(AFS_LINUX_64BIT_KERNEL) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV)
struct afs_ioctl32 dst32;
#ifdef AFS_SPARC64_LINUX24_ENV
if (current->thread.flags & SPARC_FLAG_32BIT)
-#elif AFS_SPARC64_LINUX20_ENV
+#elif defined(AFS_SPARC64_LINUX20_ENV)
if (current->tss.flags & SPARC_FLAG_32BIT)
+#elif defined(AFS_AMD64_LINUX20_ENV)
+ if (current->thread.flags & THREAD_IA32)
#else
#error Not done for this linux type
-#endif /* AFS_SPARC64_LINUX20_ENV */
+#endif
{
AFS_COPYIN(cmarg, (caddr_t) &dst32, sizeof dst32, code);
if (!code)
return EINVAL; /* out of range */
}
inSize = ablob->in_size;
- if (inSize >= PIGGYSIZE) return E2BIG;
+
+ /* Do all range checking before continuing */
+ if (inSize >= PIGGYSIZE || inSize < 0 || ablob->out_size < 0)
+ return E2BIG;
+
inData = osi_AllocLargeSpace(AFS_LRALLOCSIZ);
if (inSize > 0) {
AFS_COPYIN(ablob->in, inData, inSize, code);
include ../config/Makefile.${SYS_NAME}
-UKERNELDIR = ../libuafs/
+UKERNELDIR = ../libuafs
CFLAGS=${OPTMZ} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS}
include ../config/Makefile.${SYS_NAME}
-KERNELDIR = ../libafs/
-UKERNELDIR = ../libuafs/
+KERNELDIR = ../libafs
+UKERNELDIR = ../libuafs
COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
OBJS= cellconfig.o ktc.o userok.o writeconfig.o authcon.o \
acfg_errors.o ktc_errors.o
KOBJS= cellconfig.o ktc.krb.o userok.o writeconfig.o authcon.o \
acfg_errors.o ktc_errors.o
-CFLAGS=-g -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS}
+CFLAGS=${DBG} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS}
LIBS=libauth.a ${TOP_LIBDIR}/libsys.a \
${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/libdes.a \
${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/libsys.a \
include ../config/Makefile.${SYS_NAME}
-UKERNELDIR=../libuafs/
+UKERNELDIR=../libuafs
CFLAGS=${OPTMZ} -I${TOP_INCDIR} -I${TOP_SRCDIR}/config ${XCFLAGS}
#
# libraries
MTLIBS=-lpthread
-TXLIBS= /usr/lib/libncurses.so
+TXLIBS=-lncurses
XLIBS= @LIB_AFSDB@
#
# programs
#endif
#endif /* KERNEL */
+#ifndef KERNEL
+#define __USE_LARGEFILE64 1
+#if !defined off64_t
+#define off64_t __off64_t
+#endif
+#endif
+
/* Machine / Operating system information */
#define SYS_NAME "i386_linux24"
#define SYS_NAME_ID SYS_NAME_ID_i386_linux24
SHELL = /bin/sh
include ../config/Makefile.${SYS_NAME}
-UKERNELDIR=../libuafs/
+UKERNELDIR=../libuafs
LDFLAGS = ${XLDFLAGS}
include ../config/Makefile.${SYS_NAME}
-UKERNELDIR = ../libuafs/
+UKERNELDIR = ../libuafs
COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
CFLAGS=${OPTMZ} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS}
# Common elements for Makefiles for all system types.
#
SHELL=/bin/sh
-INCLUDE= -I. -I/usr/include -I${TOP_SRCDIR}/config
+INCLUDE= -I. -I${TOP_SRCDIR}/config
AFS =../afs
RX =../rx
AFSINT =../afsint
LD = ld
GCC_KOPTS=@LINUX_GCC_KOPTS@
# -Wall
+<i386_umlinux22 i386_umlinux24>
+P5PLUS=@P5PLUS_KOPTS@
+CCFLAGS = $(KDEBUG) -O2 $(FOMIT) $(GCC_KOPTS) -pipe $(P5PLUS) -I/usr/src/linux/arch/um/include -I/usr/src/linux/arch/um/kernel/tt/include -I/usr/src/linux/arch/um/kernel/skas/include
+DEFINES = -D__KERNEL__ -DCPU=586 -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF} ${KDEFINES}
<i386_linux22 i386_linux24>
P5PLUS=@P5PLUS_KOPTS@
CCFLAGS = $(KDEBUG) -O2 $(FOMIT) $(GCC_KOPTS) -pipe $(P5PLUS)
DEFINES = -D__KERNEL__ -DCPU=586 -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF} ${KDEFINES}
+<amd64_linux24>
+CCFLAGS = $(KDEBUG) -O2 $(FOMIT) $(GCC_KOPTS) -pipe -mcmodel=kernel
+DEFINES = -D__KERNEL__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
<alpha_linux_22 alpha_linux_24>
CCFLAGS = $(KDEBUG) -O2 $(FOMIT) $(GCC_KOPTS) -pipe -mno-fp-regs -ffixed-8
DEFINES = -D__KERNEL__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
$(RM) -f linux
ln -s ${LINUX_KERNEL_PATH}/include/linux linux
$(RM) -f net
- ln -s ${LINUX_KERNEL_PATH}/include/linux net
+ ln -s ${LINUX_KERNEL_PATH}/include/net net
$(RM) -f netinet
ln -s ${LINUX_KERNEL_PATH}/include/linux netinet
$(RM) -f sys
ln -s ${LINUX_KERNEL_PATH}/include/asm-alpha asm
<i386_linux22 i386_linux24>
ln -s ${LINUX_KERNEL_PATH}/include/asm-i386 asm
+<i386_umlinux22 i386_umlinux24>
+ ln -s ${LINUX_KERNEL_PATH}/include/asm-um asm
+<amd64_linux24>
+ ln -fs ${LINUX_KERNEL_PATH}/include/asm-x86_64 asm
<s390_linux22 s390_linux24>
ln -s ${LINUX_KERNEL_PATH}/include/asm-s390 asm
<ppc_linux22 ppc_linux24>
/usr/bin/cpp -P process.fbsd.s > process.ss; \
${AS} -o process.o process.ss; \
$(RM) process.ss ;; \
- hp* | *_linux* | sgi_64 | sgi_65 ) \
+ hp* | *_linux* | *_umlinux* | sgi_64 | sgi_65 | ia64_hpux* ) \
${CC} ${CFLAGS} -c process.c;; \
alpha_osf1 | alpha_osf20 | alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux?? ) \
${AS} -v -P -DOSF -I${TOP_INCDIR} -DASSEMBLER process.s; \
* cases, and also between machines apparently running the same OS
* version.
*/
+
+/*
+ * On ia64 where the ucontext is used, it can be an extra 48K
+ * Need to account for this. There might be two of these on the
+ * stack too. This needs to be checked.
+ */
+#if defined(USE_UCONTEXT) && defined(HAVE_UCONTEXT_H)
+#define AFS_LWP_MINSTACKSIZE (288 * 1024)
+#else
#if defined(AFS_LINUX22_ENV)
#define AFS_LWP_MINSTACKSIZE (192 * 1024)
#else
#define AFS_LWP_MINSTACKSIZE (48 * 1024)
#endif
+#endif
/* Action to take on stack overflow. */
#define LWP_SOQUIET 1 /* do nothing */
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/lwp/process.c,v 1.10 2002/09/26 19:18:08 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/lwp/process.c,v 1.11 2003/07/30 17:23:44 hartmans Exp $");
#include <stdio.h>
#include <assert.h>
{
#if defined(AFS_IA64_LINUX20_ENV)
register unsigned long sp __asm__("r12");
+#elif defined(AFS_HPUX1122_ENV)
+/* don't need anything special, will use
+ * ucontext.uc_stack.ss_sp as it matches r12.
+ * This should also work for Linux,
+ * but dont have system to test DEE
+ */
+#elif defined(AFS_AMD64_LINUX24_ENV)
+ register unsigned long sp __asm__("sp");
#else
#error "You need to update stack pointer register for this platform"
#endif
savearea->state = 0;
getcontext(&savearea->ucontext);
+#if defined(AFS_HPUX1122_ENV)
+ savearea->topstack = savearea->ucontext.uc_stack.ss_sp;
+#else
savearea->topstack = sp;
+#endif
switch (savearea->state)
{
case 0:
TOP_SRCDIR=@TOP_SRCDIR@
SYS_NAME=@AFS_SYSNAME@
SHELL=/bin/sh
-KERNELDIR = ../libafs/
+KERNELDIR = ../libafs
include ../config/Makefile.${SYS_NAME}
pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o
set -x; \
case "$(SYS_NAME)" in \
- hp_ux*) \
+ hp_ux* | ia64_hpux*) \
$(LD) $(LDFLAGS) -c mapfile.hp -o $@ afs_setcred.o afs_auth.o afs_util.o\
$(SHOBJS) $(LIBS) ;; \
sun*_5*) \
pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o
set -x; \
case "$(SYS_NAME)" in \
- hp_ux*) \
+ hp_ux* | ia64_hpux*) \
$(LD) $(LDFLAGS) -c mapfile.hp -o $@ \
afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
sun*_5*) \
test_pam: test_pam.o
set -x; \
case "$(SYS_NAME)" in \
- hp_ux*) \
+ hp_ux* | ia64_hpux*) \
$(CC) $(CFLAGS) -o $@ test_pam.o ${PAMLIBS};; \
sun*_5*) \
$(CC) $(CFLAGS) -o $@ test_pam.o ${PAMLIBS};; \
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/pinstall/install.c,v 1.2 2003/01/02 03:55:51 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/pinstall/install.c,v 1.3 2003/07/30 17:23:45 hartmans Exp $");
#include <stdio.h>
#include <pwd.h>
struct stat istat, ostat;
+/* How many systems don't have strerror now? */
+#ifndef HAVE_STRERROR
#if !defined(AFS_DARWIN60_ENV)
extern int sys_nerr;
#endif
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
extern char *sys_errlist[];
#endif
+#else
+#define ErrorString strerror
+#endif
+
#if defined(AFS_AIX_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_DECOSF_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
extern struct passwd *getpwnam();
int stripcalled = 0;
return 0;
}
+#ifndef HAVE_STRERROR
char *ErrorString(aerrno)
int aerrno; {
static char tbuffer[100];
}
return tbuffer;
}
+#endif
int
stripName(aname)
static int
quickStrip (iname, oname, ignored, copy_only)
char *iname, *oname; {
- int pid, status;
+ int pid;
+ pid_t status;
static char *strip[] = {
"strip", 0, 0,
};
exit(1);
default: /* parent */
- if (waitpid(pid, &status, 0) != pid) {
+ if (waitpid(pid, &status, 0) != pid && errno != ECHILD) {
perror("waitpid");
return -1;
}
exit(1);
default: /* parent */
- if (waitpid(pid, &status, 0) != pid) {
+ if (waitpid(pid, &status, 0) != pid && errno != ECHILD) {
perror("waitpid");
return -1;
}
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/ptserver.c,v 1.8 2002/05/12 05:50:43 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/ptserver/ptserver.c,v 1.9 2003/07/30 17:23:45 hartmans Exp $");
#include <afs/stds.h>
#ifdef AFS_AIX32_ENV
return afsconf_SuperUser(prdir, call, (char *)0);
}
-void main (argc, argv)
+int main (argc, argv)
int argc;
char **argv;
{
rx_StartServer(1);
osi_audit (PTS_FinishEvent, -1, AUD_END);
+ return 0;
}
include ../config/Makefile.${SYS_NAME}
-KERNELDIR = ../libafs/
-UKERNELDIR = ../libuafs/
+KERNELDIR = ../libafs
+UKERNELDIR = ../libuafs
CFLAGS=${OPTMZ} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -DRXDEBUG ${XCFLAGS}
${TOP_INCDIR}/rx/xdr.h
kinstall: ${KERNELDIR}/rx
- $(INSTALL) $(MKAFS_OSTYPE)/*.[ch] $(KERNELDIR)rx
- $(INSTALL) $(KSRCS) $(KERNELDIR)rx
+ $(INSTALL) $(MKAFS_OSTYPE)/*.[ch] $(KERNELDIR)/rx
+ $(INSTALL) $(KSRCS) $(KERNELDIR)/rx
ukinstall: ${UKERNELDIR}/rx
- $(INSTALL) $(UKSRCS) $(UKERNELDIR)rx
- -$(INSTALL) UKERNEL/*.[ch] $(UKERNELDIR)rx
+ $(INSTALL) $(UKSRCS) $(UKERNELDIR)/rx
+ -$(INSTALL) UKERNEL/*.[ch] $(UKERNELDIR)/rx
${DEST}/include/rx/rx_packet.h: rx_packet.h
${INSTALL} $? $@
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx.c,v 1.14 2003/04/13 19:32:24 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx.c,v 1.15 2003/07/30 17:23:45 hartmans Exp $");
#ifdef KERNEL
#include "../afs/sysincludes.h"
MUTEX_EXIT(&rx_serverPool_lock);
MUTEX_ENTER(&call->lock);
+ if (call->flags & RX_CALL_WAIT_PROC) {
+ call->flags &= ~RX_CALL_WAIT_PROC;
+ MUTEX_ENTER(&rx_stats_mutex);
+ rx_nWaiting--;
+ MUTEX_EXIT(&rx_stats_mutex);
+ }
+
if (call->state != RX_STATE_PRECALL || call->error) {
MUTEX_EXIT(&call->lock);
MUTEX_ENTER(&rx_serverPool_lock);
rxi_SendAck(call, 0, 0, 0, 0, RX_ACK_DELAY, 0);
CLEAR_CALL_QUEUE_LOCK(call);
- call->flags &= ~RX_CALL_WAIT_PROC;
- MUTEX_ENTER(&rx_stats_mutex);
- rx_nWaiting--;
- MUTEX_EXIT(&rx_stats_mutex);
break;
}
else {
#ifndef _RX_KCOMMON_H_
#define _RX_KCOMMON_H_
+#ifdef AFS_LINUX22_ENV
+#define _LINUX_CODA_FS_I 1
+#define _CODA_HEADER_ 1
+struct coda_inode_info {};
+#endif
#ifdef AFS_DARWIN_ENV
#ifndef _MACH_ETAP_H_
#define _MACH_ETAP_H_
#include "../h/dir.h"
#endif
#include "../h/buf.h"
+#if !defined(AFS_HPUX110_ENV)
#include "../h/mbuf.h"
+#endif
#else
#if defined(AFS_XBSD_ENV)
#include "../h/dirent.h"
#include "../h/sysctl.h"
#endif
#include "../netinet/in.h"
+#ifdef AFS_LINUX22_ENV
+#include "../linux/route.h"
+#else
#include "../net/route.h"
+#endif
#include "../netinet/in_systm.h"
#include "../netinet/ip.h"
#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_DARWIN60_ENV)
#ifdef AFS_LINUX22_ENV
#include "../h/sched.h"
#include "../h/netdevice.h"
+#include "../linux/if.h"
#else
#include "../h/proc.h"
#include "../h/file.h"
-#endif
#include "../net/if.h"
+#endif
#if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_DARWIN60_ENV)
#include "../netinet/in_var.h"
#endif /* ! AFS_HPUX110_ENV && ! AFS_LINUX22_ENV */
#include <afs/param.h>
#endif
-RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_packet.c,v 1.8 2003/04/13 19:32:24 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/rx/rx_packet.c,v 1.9 2003/07/30 17:23:45 hartmans Exp $");
#ifdef KERNEL
#if defined(UKERNEL)
#include "../afs/sysincludes.h"
#endif
#include "../h/socket.h"
-#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_HPUX110_ENV)
#if !defined(AFS_OSF_ENV) && !defined(AFS_AIX41_ENV)
#include "../sys/mount.h" /* it gets pulled in by something later anyway */
#endif
* message receipt is done in rxk_input or rx_put.
*/
-#ifdef AFS_SUN5_ENV
+#if defined(AFS_SUN5_ENV) || defined(AFS_HPUX110_ENV)
/*
* Copy an mblock to the contiguous area pointed to by cp.
* MTUXXX Supposed to skip <off> bytes and copy <len> bytes,
#if !defined(AFS_LINUX20_ENV)
int rx_mb_to_packet(amb, free, hdr_len, data_len, phandle)
-#ifdef AFS_SUN5_ENV
+#if defined(AFS_SUN5_ENV) || defined(AFS_HPUX110_ENV)
mblk_t *amb;
#else
struct mbuf *amb;
include ../config/Makefile.${SYS_NAME}
-KERNELDIR = ../libafs/
-UKERNELDIR = ../libuafs/
+KERNELDIR = ../libafs
+UKERNELDIR = ../libuafs
COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
CFLAGS=${OPTMZ} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I. ${XCFLAGS}
include ../config/Makefile.${SYS_NAME}
-UKERNELDIR=../libuafs/
+UKERNELDIR=../libuafs
CFLAGS=${DBUG} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS}
SFLAGS=-P -I${TOP_INCDIR}
LIBS=libsys.a ${TOP_LIBDIR}/librx.a libsys.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a ${XLIBS}
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/uss/uss_procs.c,v 1.2 2003/01/02 03:55:52 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/uss/uss_procs.c,v 1.3 2003/07/30 17:23:45 hartmans Exp $");
#include "uss_procs.h" /*Module interface*/
#include "uss_common.h" /*Common defs & operations*/
#include <fcntl.h>
#endif
#include <afs/kautils.h> /*MAXKTCREALMLEN*/
-
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
#undef USS_PROCS_DB
#undef USS_PROCS_DB_INSTANCE
if (errno != EEXIST) {
uss_procs_PrintErr(line,
"Failed to create directory '%s': %s\n",
- a_path, sys_errlist[errno]);
+ a_path, strerror(errno));
return(1);
} /*Directory didn't exist*/
} /*Create the directory*/
if (chmod(a_path, m)) {
uss_procs_PrintErr(line,
"Can't chmod() directory '%s' to be '%s' : %s\n",
- a_path, a_mode, sys_errlist[errno]);
+ a_path, a_mode, strerror(errno));
return(1);
} /* chmod the directory */
if (chown(a_path, o, -1)) {
uss_procs_PrintErr(line,
"Can't chown() directory '%s' to be owned by '%s' (uid %d): %s\n",
- a_path, a_owner, o, sys_errlist[errno]);
+ a_path, a_owner, o, strerror(errno));
return(1);
} /*Couldn't chown*/
} /*Not a dry run*/
if (stat(temp, &stbuf)) {
uss_procs_PrintErr(line, "Failed to stat '%s': %s\n",
- a_proto, sys_errlist[errno]);
+ a_proto, strerror(errno));
return(1);
}
if (chown(a_path, o, -1)) {
uss_procs_PrintErr(line,
"Can't chown() file '%s' to be owned by '%s' (uid %d): %s\n",
- a_path, a_owner, o, sys_errlist[errno]);
+ a_path, a_owner, o, strerror(errno));
return(1);
} /*chown failed*/
} /*Not a dry run*/
if (chown(a_path, o, -1)){
uss_procs_PrintErr(line,
"Can't chown() file '%s' to be owned by '%s' (uid %d): %s\n",
- a_path, a_owner, o, sys_errlist[errno]);
+ a_path, a_owner, o, strerror(errno));
return(1);
}
} /*Not a dry run*/
if (system(a_command)) {
uss_procs_PrintErr(line,
"Failed to run the '%s' command: %s\n",
- a_command, sys_errlist[errno]);
+ a_command, strerror(errno));
return(1);
}
} /*Not a dry run*/
if (symlink(a_path1, a_path2)) {
uss_procs_PrintErr(line,
"Failed to make symlink '%s' to '%s': %s\n",
- a_path1, a_path2, sys_errlist[errno]);
+ a_path1, a_path2, strerror(errno));
return(1);
}
} /*Dry run*/
if (link(a_path1, a_path2)) {
uss_procs_PrintErr(line,
"Failed to make hard link '%s' to '%s': %s\n",
- a_path1, a_path2, sys_errlist[errno]);
+ a_path1, a_path2, strerror(errno));
return(1);
}
} /*Dry run*/
if (fd1 < 0) {
uss_procs_PrintErr(line,
"%s: Failed to open '%s' for overwrite: %s.\n",
- uss_whoami, a_to, sys_errlist[errno]);
+ uss_whoami, a_to, strerror(errno));
return(1);
}
} else {
uss_procs_PrintErr(line, "%s: Failed to open '%s': %s.\n",
- uss_whoami, a_to, sys_errlist[errno]);
+ uss_whoami, a_to, strerror(errno));
return(1);
}
}
if ((fd2 = open(a_from, O_RDONLY, 0)) < 0) {
uss_procs_PrintErr(line, "%s: Error reading '%s': %s\n",
- uss_whoami, a_from, sys_errlist[errno]);
+ uss_whoami, a_from, strerror(errno));
close(fd1);
return(1);
}
if (rc) {
uss_procs_PrintErr(line,
"Failed to close '%s' %s\n",
- a_to, sys_errlist[errno]);
+ a_to, strerror(errno));
return(1);
}
if(rc = close(fd2))
uss_procs_PrintErr(line, "Warning: Failed to close '%s': %s\n",
- a_from, sys_errlist[errno]);
+ a_from, strerror(errno));
return(0);
} /*Copy*/
if (fd < 0) {
uss_procs_PrintErr(line,
"%s: Failed to open '%s' for overwrite: %s.\n",
- uss_whoami, a_f, sys_errlist[errno]);
+ uss_whoami, a_f, strerror(errno));
return(1);
}
} else {
uss_procs_PrintErr(line, "%s: Failed to open '%s': %s. \n",
- uss_whoami, a_f, sys_errlist[errno]);
+ uss_whoami, a_f, strerror(errno));
return(1);
}
}
write(fd, "\n", 1);
if (close(fd)){
uss_procs_PrintErr(line, "Failed to close '%s': %s\n",
- a_f, sys_errlist[errno]);
+ a_f, strerror(errno));
return(1);
}
return(0);
if (cant_read)
fprintf(stderr,
"%s: Can't open template '%s': %s\n",
- uss_whoami, tmp_str, sys_errlist[errno]);
+ uss_whoami, tmp_str, strerror(errno));
else {
fprintf(stderr,
"%s: Can't find template '%s' in searchlist",
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/uss/uss_vol.c,v 1.2 2003/01/02 03:55:52 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/uss/uss_vol.c,v 1.3 2003/07/30 17:23:45 hartmans Exp $");
#include "uss_vol.h" /*Interface to this module*/
#include "uss_common.h" /*Common definitions*/
else {
uss_procs_PrintErr(line,
"Couldn't create volume '%s' [error %d]: %s\n",
- a_volname, code, sys_errlist[errno]);
+ a_volname, code, strerror(errno));
return(1);
} /*Failure was NOT because it already existed*/
} /*UV_CreateVolume failed*/
}
else {
fprintf(stderr,"%s: Can't mount volume '%s' on '%s': %s\n",
- uss_whoami, a_volname, a_mpoint, sys_errlist[errno]);
+ uss_whoami, a_volname, a_mpoint, strerror(errno));
if (Oldmpoint)
free(Oldmpoint);
return(1);
if (chown(a_mpoint, o, -1)) {
fprintf(stderr,
"%s: Can't chown() mountpoint '%s' to owner '%s' (uid %d): %s\n",
- uss_whoami, a_mpoint, a_owner, o, sys_errlist[errno]);
+ uss_whoami, a_mpoint, a_owner, o, strerror(errno));
if (Oldmpoint)
free(Oldmpoint);
return(1);
INSTALLex = ${INSTALL} -m 755
CCXPG2= /usr/xpg2bin/cc
-CFLAGS=${OPTMZ} -I${TOP_INCDIR} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS}
+CFLAGS=${OPTMZ} ${DBG} -I${TOP_INCDIR} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS}
INCLS=${TOP_INCDIR}/afs/afsint.h \
${TOP_INCDIR}/afs/cmd.h \
LIBS = ${FSLIBS}
-all: fs up fstrace cmdebug livesys kdump kdump64
+#
+# In order not to rebuild kdump* again and again we use
+# AFS_SYSNAME dependent targets (generated by configure)
+#
+KDUMP=@KDUMP@
+KDUMP64=@KDUMP64@
+
+all: fs up fstrace cmdebug livesys ${KDUMP} ${KDUMP64}
#
# Build targets
${DEST}/bin/cmdebug: cmdebug
${INSTALL} -s $? $@
-${DEST}/etc/kdump: kdump
+${DEST}/etc/${KDUMP}: ${KDUMP}
-set -x; \
case ${SYS_NAME} in \
sgi_6? ) \
- ${INSTALLex} -f kdump.sh.sgi_ipnos $@; \
+ ${INSTALLex} -f kdump.sh.sgi_ipnos ${DEST}/etc/kdump; \
ln -fs kdump ${DEST}/etc/kdump32; \
ln -fs kdump.IP20 ${DEST}/etc/kdump.IP22; \
ln -fs kdump.IP20 ${DEST}/etc/kdump.IP32; \
do ${INSTALL} -s $$f ${DEST}/etc/$$f || exit $$? ; \
done ;; \
sun*_5[789] ) \
- ${INSTALLex} -f kdump.sh.solaris7 $@; \
- ${INSTALL} -s -f $? ${DEST}/etc/kdump32;; \
+ ${INSTALLex} -f kdump.sh.solaris7 ${DEST}/etc/kdump; \
+ ${INSTALL} -s -f $? $@ ;; \
*linux* ) \
- ${INSTALLex} -f kdump.sh.linux $@; \
- ${INSTALL} -s kdump-${LINUX_VERSION} ${DEST}/etc/kdump-${LINUX_VERSION} ;; \
+ ${INSTALLex} -f kdump.sh.linux ${DEST}/etc/kdump; \
+ ${INSTALL} -s $? $@ ;; \
hp_ux11* ) \
- ${INSTALLex} -f kdump.sh.hp_ux11 $@; \
- ${INSTALL} -s -f $? ${DEST}/etc/kdump32;; \
+ ${INSTALLex} -f kdump.sh.hp_ux11 ${DEST}/etc/kdump; \
+ ${INSTALL} -s -f $? $@;; \
+ ia64_hpux11* ) \
+ echo skipping kdump for ${SYS_NAME} ;; \
*) \
${INSTALL} -s $? $@ ;; \
esac
up.o: up.c AFS_component_version_number.c
up: up.o
- ${CC} ${CFLAGS} -g -o up up.o ${LIBS} ${XLIBS}
+ ${CC} ${CFLAGS} -o up up.o ${LIBS} ${XLIBS}
fs.o: fs.c ${INCLS} AFS_component_version_number.c
fs: fs.o $(LIBS)
- ${CC} ${CFLAGS} -g -o fs fs.o ${TOP_LIBDIR}/libprot.a $(LIBS) ${XLIBS}
+ ${CC} ${CFLAGS} -o fs fs.o ${TOP_LIBDIR}/libprot.a $(LIBS) ${XLIBS}
livesys.o: livesys.c ${INCLS} AFS_component_version_number.c
livesys: livesys.c $(LIBS)
- ${CC} -g -o livesys $(CFLAGS) livesys.c $(LIBS) ${XLIBS}
+ ${CC} -o livesys $(CFLAGS) livesys.c $(LIBS) ${XLIBS}
twiddle: twiddle.c $(LIBS)
- ${CC} -g -o twiddle $(CFLAGS) twiddle.c $(LIBS) ${XLIBS}
+ ${CC} -o twiddle $(CFLAGS) twiddle.c $(LIBS) ${XLIBS}
gcpags: gcpags.c $(LIBS)
- ${CC} -g -o gcpags $(CFLAGS) gcpags.c $(LIBS) ${XLIBS}
+ ${CC} -o gcpags $(CFLAGS) gcpags.c $(LIBS) ${XLIBS}
whatfid.o: whatfid.c ${INCLS} AFS_component_version_number.c
whatfid: whatfid.o ${LIBS}
- ${CC} ${CFLAGS} -g -o whatfid whatfid.o ${LIBS} ${XLIBS}
+ ${CC} ${CFLAGS} -o whatfid whatfid.o ${LIBS} ${XLIBS}
fstrace.o: fstrace.c AFS_component_version_number.c
case ${SYS_NAME} in \
sun4_411 | sun4c_411 | sun4m_412 ) \
- ${CCXPG2} -g -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c fstrace.c ;; \
+ ${CCXPG2} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c fstrace.c ;; \
sun*_4* ) \
- ${CC} -I/usr/xpg2include -I/usr/5include -g -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c fstrace.c ;; \
+ ${CC} -I/usr/xpg2include -I/usr/5include -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c fstrace.c ;; \
* ) \
- ${CC} ${CFLAGS} -g -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c fstrace.c ;; \
+ ${CC} ${CFLAGS} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I${TOP_INCDIR} -c fstrace.c ;; \
esac
fstrace: fstrace.o
pmax_ul43 | pmax_ul43a ) \
${CC} ${CFLAGS} -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a /usr/lib/libi.a ;; \
sun4_411 | sun4c_411 | sun4m_412 ) \
- ${CCXPG2} ${CFLAGS} -g -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ;; \
+ ${CCXPG2} ${CFLAGS} -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ;; \
sun*_4* ) \
- ${CC} -L/usr/xpg2lib -L/usr/5lib ${CFLAGS} -g -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a -lxpg ;; \
+ ${CC} -L/usr/xpg2lib -L/usr/5lib ${CFLAGS} -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a -lxpg ;; \
hp700_ux100 | hp800_ux100 | hp?00_ux10? | hp_ux10? | hp_ux11?) \
${CC} -I${TOP_SRCDIR}/config -o fstrace fstrace.o ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ;; \
* ) \
cmdebug: cmdebug.o ${CMLIBS}
$(CC) -o cmdebug cmdebug.o ${CFLAGS} ${CMLIBS} ${XLIBS}
-kdump.o: kdump.c ${INCLS} AFS_component_version_number.c
+${KDUMP}.o: kdump.c ${INCLS} AFS_component_version_number.c
-set -x; \
case ${SYS_NAME} in \
alpha_linux* ) \
- ${CC} -g -I${LINUX_KERNEL_PATH}/include -I${TOP_INCDIR} -I${TOP_SRCDIR}/config -I${TOP_SRCDIR}/libafs/afs -I${TOP_INCDIR} ${XCFLAGS} -mno-fp-regs -ffixed-8 -o kdump-${LINUX_VERSION}.o -c kdump.c ;; \
+ ${CC} -I${LINUX_KERNEL_PATH}/include -I${TOP_INCDIR} -I${TOP_SRCDIR}/config -I${TOP_SRCDIR}/libafs/afs -I${TOP_INCDIR} ${XCFLAGS} -mno-fp-regs -ffixed-8 -o kdump-${LINUX_VERSION}.o -c kdump.c ;; \
*linux* ) \
- ${CC} -g -I${LINUX_KERNEL_PATH}/include -I${TOP_INCDIR} -I${TOP_SRCDIR}/config -I${TOP_SRCDIR}/libafs/afs -I${TOP_INCDIR} ${XCFLAGS} -o kdump-${LINUX_VERSION}.o -c kdump.c ;; \
+ ${CC} -I${LINUX_KERNEL_PATH}/include -I${TOP_INCDIR} -I${TOP_SRCDIR}/config -I${TOP_SRCDIR}/libafs/afs -I${TOP_INCDIR} ${XCFLAGS} -o kdump-${LINUX_VERSION}.o -c kdump.c ;; \
alpha_osf1 | alpha_osf20 | alpha_osf30 | alpha_osf32 | alpha_osf32c| alpha_dux?? ) \
- ${CC} -g ${CFLAGS} -I/usr/sys/include -I/usr/sys/BINARY -I/usr/sys/AFS -DDEBUGGER -c kdump.c ;;\
+ ${CC} ${CFLAGS} -I/usr/sys/include -I/usr/sys/BINARY -I/usr/sys/AFS -DDEBUGGER -c kdump.c ;;\
sgi_6? ) \
for f in ../libafs/STATIC.IP*/CPU_KDEFS; \
do IP=`expr "$$f" : '../libafs/STATIC.\(IP..\)'`; \
echo CPU_KDEFS = $$CPU_KDEFS; \
case $$CPU_KDEFS in \
*-64*) ${CC} -D_KMEMUSER -woff 1178 \
- -g -I${TOP_INCDIR} \
+ -I${TOP_INCDIR} \
-I${TOP_SRCDIR}/config \
$$CPU_KDEFS \
${XCFLAGS64} \
-c kdump.c -o kdump.$$IP.o \
;; \
*) ${CC} -D_KMEMUSER -woff 1178 \
- -g -I${TOP_INCDIR} \
+ -I${TOP_INCDIR} \
-I${TOP_SRCDIR}/config \
$$CPU_KDEFS \
${XCFLAGS} -DAFS_32BIT_KERNEL_ENV \
done \
;; \
*) \
- ${CC} -g -I${TOP_INCDIR} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS} -c kdump.c ;; \
+ ${CC} -I${TOP_INCDIR} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS} -c kdump.c ;; \
esac ;
kdump64.o : kdump.c ${INCLS} AFS_component_version_number.c
-set -x; \
case ${SYS_NAME} in \
sun4x_5[789] | hp_ux11* ) \
- ${CC} -g -I${TOP_INCDIR} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS64} -o kdump64.o -c kdump.c ;; \
+ ${CC} -I${TOP_INCDIR} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS64} -o kdump64.o -c kdump.c ;; \
esac
-kdump: kdump.o
+${KDUMP}: ${KDUMP}.o
-set -x; \
case ${SYS_NAME} in \
sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53 | sun4_53 | sun4_54 | sun4c_54 | sun4m_54 | sunx86_54) \
- ${CC} -g -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a /usr/lib/libkvm.a -lelf ${XLIBS} ;; \
+ ${CC} -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a /usr/lib/libkvm.a -lelf ${XLIBS} ;; \
sun*_5? ) \
- ${CC} -g -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBELFA} ${XLIBKVM} ${XLIBS} ;; \
+ ${CC} -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBELFA} ${XLIBKVM} ${XLIBS} ;; \
sgi_6? ) \
for f in ../libafs/STATIC.IP*/CPU_KDEFS; \
do IP=`expr "$$f" : '../libafs/STATIC.\(IP..\)'`; \
echo IP = $$IP; \
echo CPU_KDEFS = $$CPU_KDEFS; \
case $$CPU_KDEFS in \
- *-64*) ${CC} ${XCFLAGS64} -g \
+ *-64*) ${CC} ${XCFLAGS64} \
$$CPU_KDEFS \
-o kdump.$$IP kdump.$$IP.o \
${TOP_LIBDIR}/libcmd64.a -lelf \
;; \
- *) ${CC} ${XCFLAGS} -g \
+ *) ${CC} ${XCFLAGS} \
$$CPU_KDEFS \
-o kdump.$$IP kdump.$$IP.o \
${TOP_LIBDIR}/libcmd.a -lelf \
esac || exit $$? ; \
done ;; \
*linux* ) \
- ${CC} -g -o kdump-${LINUX_VERSION} kdump-${LINUX_VERSION}.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS} ;; \
+ ${CC} -o kdump-${LINUX_VERSION} kdump-${LINUX_VERSION}.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS} ;; \
alpha_osf1 | alpha_osf20 | alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux??) \
- ${CC} -g -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS} -ll -lmld;; \
- ncrx86_* ) ${CC} -g -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a -lelf ${XLIBS} ;; \
- * ) ${CC} -g -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS} ;; \
+ ${CC} -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS} -ll -lmld;; \
+ ncrx86_* ) ${CC} -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a -lelf ${XLIBS} ;; \
+ * ) ${CC} -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBS} ;; \
esac
## kdump to read from 64 bit kernel dumps
-set -x; \
case ${SYS_NAME} in \
sun4x_5[789] | hp_ux11* ) \
- ${CC} -g ${XCFLAGS64} -o kdump64 kdump64.o ${TOP_LIBDIR}/libcmd64.a ${XLIBELFA} ${XLIBKVM} ${XLIBS} ;; \
+ ${CC} ${XCFLAGS64} -o kdump64 kdump64.o ${TOP_LIBDIR}/libcmd64.a ${XLIBELFA} ${XLIBKVM} ${XLIBS} ;; \
esac
#
${DESTDIR}${bindir}/up \
${DESTDIR}${sbindir}/fstrace \
${DESTDIR}${bindir}/cmdebug \
- ${DESTDIR}${sbindir}/kdump \
- ${DESTDIR}${sbindir}/kdump64
+ ${DESTDIR}${sbindir}/${KDUMP} \
+ ${DESTDIR}${sbindir}/${KDUMP64}
#
# Misc targets
${DESTDIR}${bindir}/cmdebug: cmdebug
${INSTALL} -s $? $@
-${DESTDIR}${sbindir}/kdump: kdump
+${DESTDIR}${sbindir}/${KDUMP}: ${KDUMP}
-set -x; \
case ${SYS_NAME} in \
sgi_6? ) \
- ${INSTALLex} -f kdump.sh.sgi_ipnos $@; \
+ ${INSTALLex} -f kdump.sh.sgi_ipnos ${DESTDIR}${sbindir}/kdump; \
ln -fs kdump ${DESTDIR}${sbindir}/kdump32; \
ln -fs kdump.IP20 ${DESTDIR}${sbindir}/kdump.IP22; \
ln -fs kdump.IP20 ${DESTDIR}${sbindir}/kdump.IP32; \
do ${INSTALL} -s $$f ${DESTDIR}${sbindir}/$$f || exit $$? ; \
done ;; \
sun*_5[789] ) \
- ${INSTALLex} -f kdump.sh.solaris7 $@; \
- ${INSTALL} -s -f $? ${DESTDIR}${sbindir}/kdump32;; \
+ ${INSTALLex} -f kdump.sh.solaris7 ${DESTDIR}${sbindir}/kdump32; \
+ ${INSTALL} -s -f $? $@;; \
*linux* ) \
- ${INSTALL} -s kdump-${LINUX_VERSION} ${DESTDIR}${sbindir}/kdump-${LINUX_VERSION} ;; \
+ ${INSTALLex} -f kdump.sh.linux ${DESTDIR}${sbindir}/kdump; \
+ ${INSTALL} -s @? $@ ;; \
hp_ux11* ) \
- ${INSTALLex} -f kdump.sh.hp_ux11 $@; \
- ${INSTALL} -s -f $? ${DESTDIR}${sbindir}/kdump32;; \
+ ${INSTALLex} -f kdump.sh.hp_ux11 ${DESTDIR}${sbindir}/kdump; \
+ ${INSTALL} -s -f $? $@;; \
*) \
${INSTALL} -s $? $@ ;; \
esac
${DEST}/bin/up \
${DEST}/etc/fstrace \
${DEST}/bin/cmdebug \
- ${DEST}/etc/kdump \
- ${DEST}/etc/kdump64
+ ${DEST}/etc/${KDUMP} \
+ ${DEST}/etc/${KDUMP64}
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/venus/fs.c,v 1.2 2003/01/02 03:55:52 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/venus/fs.c,v 1.3 2003/07/30 17:23:46 hartmans Exp $");
#include <afs/afs_args.h>
#include <rx/xdr.h>
#include <strings.h>
#include <afs/afsutil.h>
#include <stdlib.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
#include <assert.h>
#include <afs/ptclient.h>
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/venus/kdump.c,v 1.7 2003/04/13 19:32:24 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/venus/kdump.c,v 1.8 2003/07/30 17:23:46 hartmans Exp $");
#include <stdio.h>
#include <errno.h>
#define u16 unsigned short
#include <features.h>
#if __GLIBC_MINOR__ >= 2
-#define _SYS_TYPES_H
+#define _SYS_TYPES_H 1
#endif
#define __KERNEL__
#endif
#include <afsconfig.h>
#include <afs/param.h>
-RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/cnvldb.c,v 1.2 2003/01/02 03:55:53 hartmans Exp $");
+RCSID("$Header: /tmp/cvstemp/openafs/src/vlserver/cnvldb.c,v 1.3 2003/07/30 17:23:46 hartmans Exp $");
#include <afs/stds.h>
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
#include <sys/file.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
#include "cnvldb.h" /* CHANGEME! */
#include <netinet/in.h>
#include <afs/venus.h>
#include <afs/fileutil.h>
#include "vlserver.h"
-#include <strings.h>
#define MAXSIZE 2048 /* most I'll get back from PIOCTL */
#define BADSERVERID 255 /* XXX */