diff --git a/src/tvolser/Makefile.in b/src/tvolser/Makefile.in index 0838de1b66..de6b0331bf 100644 --- a/src/tvolser/Makefile.in +++ b/src/tvolser/Makefile.in @@ -31,7 +31,9 @@ RX=../rx VOLSEROBJS=volmain.o volprocs.o physio.o voltrans.o volerr.o volint.cs.o dumpstuff.o volint.ss.o volint.xdr.o vscommon.o -VLSERVEROBJS=#vldbint.cs.o vldbint.xdr.o +VLSERVEROBJS=vldbint.cs.o vldbint.xdr.o vl_errors.o + +VOSOBJS= vsprocs.o vsutils.o lockprocs.o volint.xdr.o volerr.o volint.cs.o LWPOBJS=lock.o threadname.o @@ -49,12 +51,20 @@ FSINTOBJS=# afsaux.o afscbint.cs.o afsint.ss.o afsint.xdr.o RXOBJS=rx_pthread.o -objects= ${VOLSEROBJS} ${VLSERVEROBJS} ${LWPOBJS} ${LIBACLOBJS} \ +objects= ${VOLSEROBJS} ${LWPOBJS} ${LIBACLOBJS} \ ${UTILOBJS} ${DIROBJS} ${VOLOBJS} ${FSINTOBJS} ${RXOBJS} -LIBS=${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a ${TOP_LIBDIR}/util.a +vosobjects= ${VOSOBJS} ${VLSERVEROBJS} ${LIBACLOBJS} ${UTILOBJS} ${DIROBJS} \ + ${VOLOBJS} ${FSINTOBJS} ${RXOBJS} -all: volserver +LIBS= ${TOP_LIBDIR}/libcmd.a \ + ${TOP_LIBDIR}/libafsauthent.a \ + ${TOP_LIBDIR}/libafsrpc.a \ + ${TOP_LIBDIR}/libafsutil.a \ + ${TOP_LIBDIR}/libubik_pthread.a \ + ${TOP_LIBDIR}/libusd.a + +all: volserver vos COMPILE=${CC} ${CFLAGS} -c $? @@ -78,6 +88,12 @@ volint.ss.o: ${VOLSER}/volint.ss.c ${COMPILE} volint.xdr.o: ${VOLSER}/volint.xdr.c ${COMPILE} +vsprocs.o: ${VOLSER}/vsprocs.c + ${COMPILE} +vsutils.o: ${VOLSER}/vsutils.c + ${COMPILE} +lockprocs.o: ${VOLSER}/lockprocs.c + ${COMPILE} assert.o: ${UTIL}/assert.c ${COMPILE} @@ -118,6 +134,12 @@ aclprocs.o: ${LIBACL}/aclprocs.c netprocs.o: ${LIBACL}/netprocs.c ${COMPILE} +vlserver.h vl_errors.c: ${VLSERVER}/vl_errors.et ${VLSERVER}/vlserver.p.h + $(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${VLSERVER} vl_errors -h vlserver + +vl_errors.o: vl_errors.c + ${COMPILE} + vldbint.cs.o: ${VLSERVER}/vldbint.cs.c ${COMPILE} @@ -199,16 +221,26 @@ afsint.ss.o: ${FSINT}/afsint.ss.c afsint.xdr.o: ${FSINT}/afsint.xdr.c ${COMPILE} +vos.o: ${VOLSER}/vos.c + ${COMPILE} + +vos: vos.o ${VOSOBJS} ${VLSERVEROBJS} ${LIBS} + ${CC} ${LDFLAGS} -o vos vos.o ${VOSOBJS} ${VLSERVEROBJS} ${LIBS} ${MT_LIBS} ${XLIBS} + volserver: ${objects} ${LIBS} ${CC} ${LDFLAGS} -o volserver ${objects} ${LIBS} ${MT_LIBS} ${XLIBS} -install: volserver +install: volserver vos ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir} ${INSTALL} volserver ${DESTDIR}${afssrvlibexecdir}/volserver + ${INSTALL} vos ${DESTDIR}${afssrvlibexecdir}/vos + ${INSTALL} vos ${DESTDIR}${sbindir}/vos -dest: volserver +dest: volserver vos ${INSTALL} -d ${DEST}/root.server/usr/afs/bin ${INSTALL} volserver ${DEST}/root.server/usr/afs/bin/volserver + ${INSTALL} vos ${DEST}/root.server/usr/afs/bin/vos + ${INSTALL} vos ${DEST}/etc/vos clean: $(RM) -f *.o volserver core AFS_component_version_number.c diff --git a/src/volser/vos.c b/src/volser/vos.c index b436a66a43..309e7a5699 100644 --- a/src/volser/vos.c +++ b/src/volser/vos.c @@ -280,7 +280,11 @@ SendFile(usd_handle_t ufd, register struct rx_call *call, long blksize) FD_ZERO(&in); FD_SET((int)(ufd->handle), &in); /* don't timeout if read blocks */ +#if defined(AFS_PTHREAD_ENV) + select(((int)(ufd->handle)) + 1, &in, 0, 0, 0); +#else IOMGR_Select(((int)(ufd->handle)) + 1, &in, 0, 0, 0); +#endif #endif error = USD_READ(ufd, buffer, blksize, &nbytes); if (error) { @@ -390,7 +394,11 @@ ReceiveFile(usd_handle_t ufd, struct rx_call *call, long blksize) FD_ZERO(&out); FD_SET((int)(ufd->handle), &out); /* don't timeout if write blocks */ +#if defined(AFS_PTHREAD_ENV) + select(((int)(ufd->handle)) + 1, &out, 0, 0, 0); +#else IOMGR_Select(((int)(ufd->handle)) + 1, 0, &out, 0, 0); +#endif #endif error = USD_WRITE(ufd, &buffer[bytesread - bytesleft], bytesleft, &w); diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index 75a7c1a84d..1c07dd3cb5 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -55,7 +55,7 @@ RCSID #include /* signal(), kill(), wait(), etc. */ #include -#include +#include "volser_prototypes.h" struct ubik_client *cstruct; int verbose = 0;