From 516fc4207d1ec33dc3c68c8379f946b9f498afef Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Mon, 31 Jan 2005 04:23:01 +0000 Subject: [PATCH] STABLE14-no-copy-libafs-builds-20021015 make things so file copies from src/libafs don't happen; change how libafs_tree is done (cherry picked from commit 782109a29bd751a7681e3a31aeaa077e880208c3) --- acinclude.m4 | 19 ++++++++ src/config/param.i386_obsd31.h | 3 ++ src/libuafs/Makefile.common.in | 33 ++++++++++++++ src/lwp/Makefile.in | 3 ++ src/sys/Makefile.in | 6 +-- src/volser/vsprocs.c | 79 ++++++++++++++++++++++++++++++++++ 6 files changed, 138 insertions(+), 5 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index a3b453202..931de5b7d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1092,4 +1092,23 @@ AC_SUBST(HELPER_SPLINT) AC_SUBST(HELPER_SPLINTCFG) +TOP_SRCDIR="${srcdir}/src" +dnl +dnl If we're using ./configure, need a more reasonable TOP_SRCDIR, since relative links don't work everywhere +dnl +case $TOP_SRCDIR in + /*) + ;; + *) + TOP_SRCDIR=${SRCDIR_PARENT}/src +esac + +TOP_OBJDIR="${SRCDIR_PARENT}" +TOP_INCDIR="${SRCDIR_PARENT}/include" +TOP_LIBDIR="${SRCDIR_PARENT}/lib" +if test "${DEST}x" = "x"; then + DEST="${SRCDIR_PARENT}/${AFS_SYSNAME}/dest" +fi + + ]) diff --git a/src/config/param.i386_obsd31.h b/src/config/param.i386_obsd31.h index ec2b6d643..38f02fc28 100644 --- a/src/config/param.i386_obsd31.h +++ b/src/config/param.i386_obsd31.h @@ -1,3 +1,6 @@ +#ifndef UKERNEL +/* This section for kernel libafs compiles only */ + /* * Jim Rees, University of Michigan CITI */ diff --git a/src/libuafs/Makefile.common.in b/src/libuafs/Makefile.common.in index 8b9c37d36..3cb0f277f 100644 --- a/src/libuafs/Makefile.common.in +++ b/src/libuafs/Makefile.common.in @@ -53,6 +53,39 @@ COMMON_INCLUDE = -I. -I.. -I../nfs \ -I${TOP_INCDIR} \ -I${TOP_INCDIR}/afs +TOP_OBJ_FSINT = ${TOP_OBJDIR}/src/fsint +TOP_OBJ_RXSTAT = ${TOP_OBJDIR}/src/rxstat +TOP_OBJ_VLSERVER = ${TOP_OBJDIR}/src/vlserver + +TOP_SRC_AFS = ${TOP_SRCDIR}/afs +TOP_SRC_RXSTAT = ${TOP_SRCDIR}/rxstat +TOP_SRC_FSINT = ${TOP_SRCDIR}/fsint +TOP_SRC_RX = ${TOP_SRCDIR}/rx +TOP_SRC_VNOPS = ${TOP_SRCDIR}/afs/VNOPS +TOP_SRC_RXKAD = ${TOP_SRCDIR}/rxkad + +COMMON_INCLUDE = -I. -I.. -I../nfs \ + -I${TOP_SRCDIR} \ + -I${TOP_SRCDIR}/afs \ + -I${TOP_SRCDIR}/afs/UKERNEL \ + -I${TOP_SRCDIR}/config \ + -I${TOP_SRCDIR}/rx \ + -I${TOP_SRCDIR}/rx/UKERNEL \ + -I${TOP_SRCDIR}/rxkad \ + -I${TOP_SRCDIR}/rxkad/domestic \ + -I${TOP_SRCDIR}/util \ + -I${TOP_OBJDIR}/src \ + -I${TOP_OBJDIR}/src/afs/UKERNEL \ + -I${TOP_OBJDIR}/src/afs \ + -I${TOP_OBJDIR}/src/util \ + -I${TOP_OBJDIR}/src/rxkad \ + -I${TOP_OBJDIR}/src/config \ + -I${TOP_OBJDIR}/src/fsint \ + -I${TOP_OBJDIR}/src/vlserver \ + -I${TOP_OBJDIR}/src/libuafs \ + -I${TOP_INCDIR} \ + -I${TOP_INCDIR}/afs \ + # Build rules - CC and CFLAGS are defined in system specific MakefileProtos. all: ${TOP_LIBDIR}/$(LIBJUAFS) ${TOP_LIBDIR}/$(LIBUAFS) linktest diff --git a/src/lwp/Makefile.in b/src/lwp/Makefile.in index c88ab6e9f..6ae1330c8 100644 --- a/src/lwp/Makefile.in +++ b/src/lwp/Makefile.in @@ -19,6 +19,9 @@ all: ${TOP_LIBDIR}/liblwp.a ${TOP_INCDIR}/lock.h ${TOP_INCDIR}/lwp.h ${TOP_INCDI depinstall: ${TOP_INCDIR}/lock.h ${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/preempt.h ${TOP_INCDIR}/timer.h +depinstall: ${TOP_INCDIR}/lock.h ${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/preempt.h ${TOP_INCDIR}/timer.h + + # # Build rules # diff --git a/src/sys/Makefile.in b/src/sys/Makefile.in index 497e4133f..1e073133a 100644 --- a/src/sys/Makefile.in +++ b/src/sys/Makefile.in @@ -25,11 +25,7 @@ all: \ ${TOP_INCDIR}/afs/afs.exp \ ${TOP_INCDIR}/afs/xfsattrs.h \ ${TOP_LIBDIR}/afs.exp \ - ${TOP_LIBDIR}/libsys.a \ - ${KERNELDIR}/afs \ - ${KERNELDIR}/afs/xfsattrs.h \ - ${UKERNELDIR}/afs \ - ${UKERNELDIR}/afs/afsl.exp + ${TOP_LIBDIR}/libsys.a libsys.a: ${OBJECTS} ${RMTOBJS} afsl.exp AFS_component_version_number.o -$(RM) -f $@ diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index 1bd3a948c..4d9dfa2b0 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -173,6 +173,85 @@ static afs_int32 CheckVolume(volintInfo * volumeinfo, afs_int32 aserver, afs_uint32 * maxvolid); +/* Utility macros used by rest of this source file */ +#define EPRINT(ec, es) \ + fprintf(STDERR, "\n"); \ + fprintf(STDERR, (es)); \ + PrintError(" ",ec); + +#define EPRINT1(ec, es, ep1) \ + fprintf(STDERR, "\n"); \ + fprintf(STDERR, (es), (ep1)); \ + PrintError(" ",ec); + +#define EPRINT2(ec, es, ep1, ep2) \ + fprintf(STDERR, "\n"); \ + fprintf(STDERR, (es), (ep1), (ep2)); \ + PrintError(" ",ec); + +#define EPRINT3(ec, es, ep1, ep2, ep3) \ + fprintf(STDERR, "\n"); \ + fprintf(STDERR, (es), (ep1), (ep2), (ep3)); \ + PrintError(" ",ec); + +#define EGOTO(where, ec, es) \ + if (ec) { \ + EPRINT((ec),(es)); \ + error = (ec); \ + goto where; \ + } + +#define EGOTO1(where, ec, es, ep1) \ + if (ec) { \ + EPRINT1((ec),(es),(ep1)); \ + error = (ec); \ + goto where; \ + } + +#define EGOTO2(where, ec, es, ep1, ep2) \ + if (ec) { \ + EPRINT2((ec),(es),(ep1),(ep2)); \ + error = (ec); \ + goto where; \ + } + +#define EGOTO3(where, ec, es, ep1, ep2, ep3) \ + if (ec) { \ + EPRINT3((ec),(es),(ep1),(ep2),(ep3)); \ + error = (ec); \ + goto where; \ + } + +#define VPRINT(es) \ + { if (verbose) { fprintf(STDOUT, (es)); fflush(STDOUT); } } +#define VPRINT1(es, p) \ + { if (verbose) { fprintf(STDOUT, (es), (p)); fflush(STDOUT); } } +#define VPRINT2(es, p1, p2) \ + { if (verbose) { fprintf(STDOUT, (es), (p1), (p2)); fflush(STDOUT); } } +#define VPRINT3(es, p1, p2, p3) \ + { if (verbose) { fprintf(STDOUT, (es), (p1), (p2), (p3)); fflush(STDOUT); } } +#define VDONE \ + { if (verbose) { fprintf(STDOUT, " done\n"); fflush(STDOUT); } } + + + +/* getting rid of this */ +#define ERROR_EXIT(code) {error=(code); goto error_exit;} + + +/* Protos for static routines */ +static afs_int32 CheckAndDeleteVolume(struct rx_connection *aconn, + afs_int32 apart, afs_int32 okvol, afs_int32 delvol); +static int DelVol (struct rx_connection *conn, afs_int32 vid, afs_int32 part, afs_int32 flags); +static int GetTrans (struct nvldbentry *vldbEntryPtr, afs_int32 index, struct rx_connection **connPtr, + afs_int32 *transPtr, afs_int32 *timePtr); +static int SimulateForwardMultiple(struct rx_connection *fromconn, afs_int32 fromtid, + afs_int32 fromdate, manyDests *tr, afs_int32 flags, void *cookie, manyResults *results); +static int rel_compar (struct release *r1, struct release *r2); +static afs_int32 CheckVolume(volintInfo *volumeinfo, afs_int32 aserver, afs_int32 apart, + afs_int32 *modentry, afs_uint32 *maxvolid); + + /*map the partition into partition name */ void MapPartIdIntoName(afs_int32 partId, char *partName) -- 2.39.5