From 32333515ef93c3cea1091183c49cd8c8d8abfa9a Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Mon, 16 Mar 2009 13:39:15 +0000 Subject: [PATCH] DEVEL15-bubasics-prototypes-20090316 LICENSE IPL10 FIXES 124237 prototype the bubasics directory make the volser prototypes available for bubasics to use (cherry picked from commit 14c3d5ed9179574692a0f7a5cc15d625083e3cf8) --- src/bubasics/Makefile.in | 8 ++++---- src/bubasics/bubasics.h | 6 +++--- src/bubasics/butm.p.h | 37 ++++++++++++++++++++++--------------- src/volser/Makefile.in | 11 +++++++++++ 4 files changed, 40 insertions(+), 22 deletions(-) diff --git a/src/bubasics/Makefile.in b/src/bubasics/Makefile.in index 21b37680d..6fd4c81b4 100644 --- a/src/bubasics/Makefile.in +++ b/src/bubasics/Makefile.in @@ -34,16 +34,16 @@ butc.cs.c: butc.h butc.ss.c: butc.h bumon.xdr.c: bumon.xg - ${RXGEN} -c -o $@ ${srcdir}/bumon.xg + ${RXGEN} -A -c -o $@ ${srcdir}/bumon.xg bumon.ss.c: bumon.xg - ${RXGEN} -S -o $@ ${srcdir}/bumon.xg + ${RXGEN} -A -S -o $@ ${srcdir}/bumon.xg bumon.cs.c: bumon.xg - ${RXGEN} -C -o $@ ${srcdir}/bumon.xg + ${RXGEN} -A -C -o $@ ${srcdir}/bumon.xg bumon.h: bumon.xg - ${RXGEN} -h -o $@ ${srcdir}/bumon.xg + ${RXGEN} -A -h -o $@ ${srcdir}/bumon.xg bumon.xdr.c: bumon.h bumon.ss.c: bumon.h diff --git a/src/bubasics/bubasics.h b/src/bubasics/bubasics.h index 8fbd5949f..d647b49fd 100644 --- a/src/bubasics/bubasics.h +++ b/src/bubasics/bubasics.h @@ -162,9 +162,9 @@ typedef dlqlinkT *dlqlinkP; } /* function typing */ -extern dlqlinkP dlqFront(); -extern dlqlinkP dlqUnlinkb(); -extern dlqlinkP dlqUnlinkf(); +extern dlqlinkP dlqFront(dlqlinkP); +extern dlqlinkP dlqUnlinkb(dlqlinkP); +extern dlqlinkP dlqUnlinkf(dlqlinkP); /* ----------------------------- * Status management diff --git a/src/bubasics/butm.p.h b/src/bubasics/butm.p.h index cd4475375..1c202f439 100644 --- a/src/bubasics/butm.p.h +++ b/src/bubasics/butm.p.h @@ -24,24 +24,31 @@ struct blockMark { #define BUTM_HDRSIZE ((5*sizeof(afs_int32)) + sizeof(int)) /* sizeof blockMark */ #define BUTM_BLKSIZE (BUTM_BLOCKSIZE - BUTM_HDRSIZE) +struct butm_tapeLabel; + struct butm_tapeInfo { afs_int32 structVersion; struct { - afs_int32(*mount) (); - afs_int32(*dismount) (); - afs_int32(*create) (); - afs_int32(*readLabel) (); - afs_int32(*seek) (); - afs_int32(*seekEODump) (); - afs_int32(*readFileBegin) (); - afs_int32(*readFileData) (); - afs_int32(*readFileEnd) (); - afs_int32(*writeFileBegin) (); - afs_int32(*writeFileData) (); - afs_int32(*writeFileEnd) (); - afs_int32(*writeEOT) (); - afs_int32(*setSize) (); - afs_int32(*getSize) (); + afs_int32(*mount) (struct butm_tapeInfo *, char *); + afs_int32(*dismount) (struct butm_tapeInfo *); + afs_int32(*create) (struct butm_tapeInfo *, struct butm_tapeLabel *, + afs_int32); + afs_int32(*readLabel) (struct butm_tapeInfo *, + struct butm_tapeLabel *, + afs_int32); + afs_int32(*seek) (struct butm_tapeInfo *, afs_int32); + afs_int32(*seekEODump) (struct butm_tapeInfo *, afs_int32); + afs_int32(*readFileBegin) (struct butm_tapeInfo *); + afs_int32(*readFileData) (struct butm_tapeInfo *, char *, int len, + int *); + afs_int32(*readFileEnd) (struct butm_tapeInfo *); + afs_int32(*writeFileBegin) (struct butm_tapeInfo *); + afs_int32(*writeFileData) (struct butm_tapeInfo *, char *, afs_int32, + afs_int32); + afs_int32(*writeFileEnd) (struct butm_tapeInfo *); + afs_int32(*writeEOT) (struct butm_tapeInfo *); + afs_int32(*setSize) (struct butm_tapeInfo *, afs_uint32); + afs_int32(*getSize) (struct butm_tapeInfo *, afs_uint32); } ops; char name[BU_MAXTAPELEN]; afs_int32 position; /* current position of tape */ diff --git a/src/volser/Makefile.in b/src/volser/Makefile.in index 7952b410e..2bfa088cc 100644 --- a/src/volser/Makefile.in +++ b/src/volser/Makefile.in @@ -56,6 +56,7 @@ SOBJS=volmain.o volprocs.o physio.o common.o voltrans.o volerr.o \ all: volserver vos restorevol voldump \ ${TOP_INCDIR}/afs/volser.h \ + ${TOP_INCDIR}/afs/vsutils_prototypes.h \ ${TOP_INCDIR}/afs/volint.h \ ${TOP_LIBDIR}/libvolser.a @@ -132,6 +133,9 @@ install: \ ${DEST}/include/afs/volser.h: volser.h ${INSTALL} $? $@ +${DEST}/include/afs/vsutils_prototypes.h: vsutils_prototypes.h + ${INSTALL} $? $@ + ${DEST}/include/afs/volint.h: volint.h ${INSTALL} $? $@ @@ -182,6 +186,12 @@ ${DESTDIR}${includedir}/afs/volser.h: volser.h ${TOP_INCDIR}/afs/volser.h: volser.h ${INSTALL} $? $@ +${DESTDIR}${includedir}/afs/vsutils_prototypes.h: vsutils_prototypes.h + ${INSTALL} $? $@ + +${TOP_INCDIR}/afs/vsutils_prototypes.h: vsutils_prototypes.h + ${INSTALL} $? $@ + ${DESTDIR}${includedir}/afs/volint.h: volint.h ${INSTALL} $? $@ @@ -218,6 +228,7 @@ dest: \ ${DEST}/etc/restorevol \ ${DEST}/etc/voldump \ ${DEST}/include/afs/volser.h \ + ${DEST}/include/afs/vsutils_prototypes.h \ ${DEST}/include/afs/volint.h \ ${DEST}/etc/vos \ ${DEST}/root.server/usr/afs/bin/vos \ -- 2.39.5