int dbWatcherinprogress;
afs_int32
-threadEntryDir(anEntry, size, type)
- char *anEntry;
- afs_int32 size, type;
+threadEntryDir(char *anEntry, afs_int32 size, afs_int32 type)
{
dlqlinkP entryPtr;
char *entry = NULL;
*/
afs_int32
-threadEntry(anEntry, size, type)
- char *anEntry;
- afs_int32 size, type;
+threadEntry(char *anEntry, afs_int32 size, afs_int32 type)
{
dlqlinkP entryPtr;
char *entry = NULL;
/* ------------------------------------------------------------------ */
afs_int32
-useDump(dumpEntryPtr)
- struct budb_dumpEntry *dumpEntryPtr;
+useDump(struct budb_dumpEntry *dumpEntryPtr)
{
afs_int32 code = 0;
* Creates a dump entry (finished) and puts it onto the savedEntries list.
*/
afs_int32
-finishDump(aDumpEntryPtr)
- struct budb_dumpEntry *aDumpEntryPtr;
+finishDump(struct budb_dumpEntry *aDumpEntryPtr)
{
afs_int32 code = 0;
* Creates a tape entry and puts it onto the savedEntries list.
*/
afs_int32
-useTape(aTapeEntryPtr, dumpID, tapename, tapeSeq, useCount, written,
- expiration, tapepos)
- struct budb_tapeEntry *aTapeEntryPtr;
- afs_int32 dumpID;
- char *tapename;
- afs_int32 tapeSeq;
- afs_int32 useCount;
- Date written;
- Date expiration;
- afs_int32 tapepos;
+useTape(struct budb_tapeEntry *aTapeEntryPtr, afs_int32 dumpID, char *tapename, afs_int32 tapeSeq, afs_int32 useCount, Date written, Date expiration, afs_int32 tapepos)
{
afs_int32 code = 0;
* Creates a tape entry (finished) and puts it onto the savedEntries list.
*/
afs_int32
-finishTape(aTapeEntryPtr, useKBytes)
- struct budb_tapeEntry *aTapeEntryPtr;
- afs_int32 useKBytes;
+finishTape(struct budb_tapeEntry *aTapeEntryPtr, afs_int32 useKBytes)
{
afs_int32 code = 0;
* Creates a volume entry and puts it onto the savedEntries list.
*/
afs_int32
-addVolume(aVolEntryPtr, dumpID, tapename, volname, volid, cloneDate, startPos,
- volBytes, fragment, flags)
- struct budb_volumeEntry *aVolEntryPtr;
- afs_int32 dumpID;
- char *tapename;
- char *volname;
- afs_int32 volid;
- Date cloneDate;
- afs_int32 startPos;
- afs_int32 volBytes;
- int fragment;
- afs_int32 flags;
+addVolume(struct budb_volumeEntry *aVolEntryPtr, afs_int32 dumpID, char *tapename, char *volname, afs_int32 volid, Date cloneDate, afs_int32 startPos, afs_int32 volBytes, int fragment, afs_int32 flags)
{
afs_int32 code = 0;
int allo = 0;
* and tapes and volumes should not be added to the DB.
*/
afs_int32
-flushSavedEntries(status)
- afs_int32 status;
+flushSavedEntries(afs_int32 status)
{
dlqlinkP entryPtr;
struct budb_tapeEntry *tapePtr;
return (code);
}
+void
waitDbWatcher()
{
int message = 0;
#define MAXVOLUMESTOADD 100
int addvolumes = 1;
+void
dbWatcher()
{
dlqlinkP entryPtr;
}
-#ifdef notdef
-void static
-DisplayNode(nodePtr)
- struct dumpNode *nodePtr;
-{
- TapeLog(99, nodePtr->dumpId, "Created dumpNode");
- return;
-
-}
-#endif
-
/* initialize the node list used to keep track of the active dumps */
void
-InitNodeList(portOffset)
- afs_int32 portOffset;
+InitNodeList(afs_int32 portOffset)
{
maxTaskID = (portOffset * 1000) + 1; /* this is the first task id alotted */
headNode.taskID = -1;
*/
void
-CreateNode(newNode)
- struct dumpNode **newNode;
+CreateNode(struct dumpNode **newNode)
{
/* get space */
*newNode = (struct dumpNode *)(malloc(sizeof(struct dumpNode)));
/* free the space allotted to the node with <taskID> */
void
-FreeNode(taskID)
- afs_int32 taskID;
+FreeNode(afs_int32 taskID)
{
struct dumpNode *oldPtr, *newPtr, *curPtr;
int done;
}
afs_int32
-GetNthNode(aindex, aresult)
- afs_int32 aindex;
- afs_int32 *aresult;
+GetNthNode(afs_int32 aindex, afs_int32 *aresult)
{
register struct dumpNode *tn;
register int i;
/* return the node with <taskID> into <resultNode> */
afs_int32
-GetNode(taskID, resultNode)
- afs_int32 taskID;
- struct dumpNode **resultNode;
+GetNode(afs_int32 taskID, struct dumpNode **resultNode)
{
struct dumpNode *tmpPtr;
int done;
/* PrintDumpLabel
* print out the tape (dump) label.
*/
-
-PrintDumpLabel(labelptr)
- struct butm_tapeLabel *labelptr;
+void
+PrintDumpLabel(struct butm_tapeLabel *labelptr)
{
char tapeName[BU_MAXTAPELEN + 32];
time_t t;
/* PrintVolumeHeader
* print the contents of a volume header.
*/
-static
-PrintVolumeHeader(volHeader)
- struct volumeHeader *volHeader;
+static void
+PrintVolumeHeader(struct volumeHeader *volHeader)
{
time_t t;
*/
afs_int32
-Ask(st)
- char *st;
+Ask(char *st)
{
int response;
*/
#define BIGCHUNK 102400
-static
-scanVolData(taskId, curTapePtr, tapeVersion, volumeHeader, volumeTrailer,
- bytesRead)
- afs_int32 taskId;
- struct butm_tapeInfo *curTapePtr;
- afs_int32 tapeVersion;
- struct volumeHeader *volumeHeader, *volumeTrailer;
- afs_uint32 *bytesRead;
+static int
+scanVolData(afs_int32 taskId, struct butm_tapeInfo *curTapePtr, afs_int32 tapeVersion, struct volumeHeader *volumeHeader, struct volumeHeader *volumeTrailer, afs_uint32 *bytesRead)
{
afs_int32 headBytes, tailBytes;
char *block = NULL;
*/
char *
-nextTapeLabel(prevTapeName)
- char *prevTapeName;
+nextTapeLabel(char *prevTapeName)
{
char *prevdot;
char *retval;
afs_int32 RcreateDump();
-static
-readDump(taskId, tapeInfoPtr, scanInfoPtr)
- afs_uint32 taskId;
- struct butm_tapeInfo *tapeInfoPtr;
- struct tapeScanInfo *scanInfoPtr;
+static int
+readDump(afs_uint32 taskId, struct butm_tapeInfo *tapeInfoPtr, struct tapeScanInfo *scanInfoPtr)
{
int moreTapes = 1;
afs_int32 nbytes, flags, seq;
* try to read that dump too.
* The first tape label is the first dumpLabel.
*/
-readDumps(taskId, tapeInfoPtr, scanInfoPtr)
- afs_uint32 taskId;
- struct butm_tapeInfo *tapeInfoPtr;
- struct tapeScanInfo *scanInfoPtr;
+int
+readDumps(afs_uint32 taskId, struct butm_tapeInfo *tapeInfoPtr, struct tapeScanInfo *scanInfoPtr)
{
afs_int32 code, c;
}
afs_int32
-getScanTape(taskId, tapeInfoPtr, tname, tapeId, prompt, tapeLabelPtr)
- afs_int32 taskId;
- struct butm_tapeInfo *tapeInfoPtr;
- char *tname;
- afs_int32 tapeId;
- int prompt;
- struct butm_tapeLabel *tapeLabelPtr;
+getScanTape(afs_int32 taskId, struct butm_tapeInfo *tapeInfoPtr, char *tname, afs_int32 tapeId, int prompt, struct butm_tapeLabel *tapeLabelPtr)
{
afs_int32 code = 0;
int tapecount = 1;
*
*/
-ScanDumps(ptr)
- struct scanTapeIf *ptr;
+int
+ScanDumps(struct scanTapeIf *ptr)
{
struct butm_tapeInfo curTapeInfo;
struct tapeScanInfo tapeScanInfo;
* 0 - not ok
* 1 - ok
*/
-validatePath(labelptr, pathptr)
- struct butm_tapeLabel *labelptr;
- char *pathptr;
+int
+validatePath(struct butm_tapeLabel *labelptr, char *pathptr)
{
char *up, *tp;
char tapeName[BU_MAXTAPELEN];
*/
char *
-volumesetNamePtr(ptr)
- char *ptr;
+volumesetNamePtr(char *ptr)
{
static char vsname[BU_MAXUNAMELEN];
char *dotPtr;
}
char *
-extractDumpName(ptr)
- char *ptr;
+extractDumpName(char *ptr)
{
static char dname[BU_MAXTAPELEN];
char *dotPtr;
* -1 - error, couldn't extract sequence number
*/
-extractTapeSeq(tapename)
- char *tapename;
+int
+extractTapeSeq(char *tapename)
{
char *sptr;
* a database tape or not.
*/
int
-databaseTape(tapeName)
- char *tapeName;
+databaseTape(char *tapeName)
{
char *sptr;
int c;
}
afs_int32
-RcreateDump(tapeScanInfoPtr, volHeaderPtr)
- struct tapeScanInfo *tapeScanInfoPtr;
- struct volumeHeader *volHeaderPtr;
+RcreateDump(struct tapeScanInfo *tapeScanInfoPtr, struct volumeHeader *volHeaderPtr)
{
afs_int32 code;
struct butm_tapeLabel *dumpLabelPtr = &tapeScanInfoPtr->dumpLabel;
}
static afs_int32
-SafeATOL(anum)
- register char *anum;
+SafeATOL(register char *anum)
{
register afs_int32 total;
register int tc;
* should deal with signed numbers. Should signal error if no digits
* seen.
*/
-atocl(numstring, crunit, number)
- char *numstring;
- char crunit; /* Units to report number in */
- afs_int32 *number;
+int
+atocl(char *numstring, char crunit, afs_int32 *number)
{
float total;
afs_int32 runits;
/* replace last two ocurrences of / by _ */
static
-stringReplace(name)
- char *name;
+stringReplace(char *name)
{
char *pos;
char buffer[256];
}
static
-stringNowReplace(logFile, deviceName)
- char *logFile, *deviceName;
-
+stringNowReplace(char *logFile, char *deviceName)
{
char *pos = 0;
char storeDevice[256];
#define LINESIZE 256
static afs_int32
-GetDeviceConfig(filename, config, portOffset)
- char *filename;
- struct tapeConfig *config;
- afs_int32 portOffset;
+GetDeviceConfig(char *filename, struct tapeConfig *config, afs_int32 portOffset)
{
FILE *devFile = 0;
char line[LINESIZE];
/* GetConfigParams
*/
static afs_int32
-GetConfigParams(filename, port)
- char *filename;
- afs_int32 port;
+GetConfigParams(char *filename, afs_int32 port)
{
char paramFile[256];
FILE *devFile = 0;
return (code);
}
-static
-WorkerBee(as, arock)
- struct cmd_syndesc *as;
- char *arock;
+static int
+WorkerBee(struct cmd_syndesc *as, char *arock)
{
register afs_int32 code;
struct rx_securityClass *(securityObjects[3]);
#include "AFS_component_version_number.c"
#endif
-main(argc, argv)
- int argc;
- char **argv;
+int
+main(int argc, char **argv)
{
register struct cmd_syndesc *ts;
register struct cmd_item *ti;
#include "error_macros.h"
#include "butc_xbsa.h"
-callPermitted(call)
- struct rx_call *call;
+int
+callPermitted(struct rx_call *call)
{
/* before this code can be used, the rx connection, on the bucoord side, must */
/* be changed so that it will set up for token passing instead of using a */
*/
static int
-CopyDumpDesc(toDump, fromDump)
- struct tc_dumpDesc *toDump;
- tc_dumpArray *fromDump;
+CopyDumpDesc(struct tc_dumpDesc *toDump, tc_dumpArray *fromDump)
{
struct tc_dumpDesc *toPtr, *fromPtr;
int i;
static int
-CopyRestoreDesc(toRestore, fromRestore)
- struct tc_restoreDesc *toRestore;
- tc_restoreArray *fromRestore;
+CopyRestoreDesc(struct tc_restoreDesc *toRestore, tc_restoreArray *fromRestore)
{
struct tc_restoreDesc *toPtr, *fromPtr;
int i;
}
static int
-CopyTapeSetDesc(toPtr, fromPtr)
- struct tc_tapeSet *toPtr, *fromPtr;
+CopyTapeSetDesc(struct tc_tapeSet *toPtr, struct tc_tapeSet *fromPtr)
{
toPtr->id = fromPtr->id;
*/
afs_int32
-STC_LabelTape(acid, label, taskId)
- struct rx_call *acid;
- struct tc_tapeLabel *label;
- afs_uint32 *taskId;
+STC_LabelTape(struct rx_call *acid, struct tc_tapeLabel *label, afs_uint32 *taskId)
{
#ifdef AFS_PTHREAD_ENV
pthread_t pid;
*/
afs_int32
-STC_PerformDump(rxCallId, tcdiPtr, tc_dumpArrayPtr, taskId)
- struct rx_call *rxCallId;
- struct tc_dumpInterface *tcdiPtr;
- tc_dumpArray *tc_dumpArrayPtr;
- afs_int32 *taskId;
+STC_PerformDump(struct rx_call *rxCallId, struct tc_dumpInterface *tcdiPtr, tc_dumpArray *tc_dumpArrayPtr, afs_int32 *taskId)
{
struct dumpNode *newNode = 0;
statusP statusPtr = 0;
}
afs_int32
-STC_PerformRestore(acid, dumpSetName, arestores, taskID)
- struct rx_call *acid;
- char *dumpSetName; /* not used */
- tc_restoreArray *arestores;
- afs_int32 *taskID;
+STC_PerformRestore(struct rx_call *acid, char *dumpSetName, tc_restoreArray *arestores, afs_int32 *taskID)
{
struct dumpNode *newNode;
statusP statusPtr;
}
afs_int32
-STC_ReadLabel(acid, label, taskId)
- struct rx_call *acid;
- struct tc_tapeLabel *label;
- afs_uint32 *taskId;
+STC_ReadLabel(struct rx_call *acid, struct tc_tapeLabel *label, afs_uint32 *taskId)
{
afs_int32 code;
*/
afs_int32
-STC_RestoreDb(rxCall, taskId)
- struct rx_call *rxCall;
- afs_uint32 *taskId;
+STC_RestoreDb(struct rx_call *rxCall, afs_uint32 *taskId)
{
#ifdef AFS_PTHREAD_ENV
pthread_t pid;
*/
afs_int32
-STC_SaveDb(rxCall, archiveTime, taskId)
- struct rx_call *rxCall;
- Date archiveTime;
- afs_uint32 *taskId;
+STC_SaveDb(struct rx_call *rxCall, Date archiveTime, afs_uint32 *taskId)
{
#ifdef AFS_PTHREAD_ENV
pthread_t pid;
*/
afs_int32
-STC_ScanDumps(acid, addDbFlag, taskId)
- struct rx_call *acid;
- afs_int32 addDbFlag;
- afs_uint32 *taskId;
+STC_ScanDumps(struct rx_call *acid, afs_int32 addDbFlag, afs_uint32 *taskId)
{
#ifdef AFS_PTHREAD_ENV
pthread_t pid;
*/
afs_int32
-STC_TCInfo(acid, tciptr)
- struct rx_call *acid;
- struct tc_tcInfo *tciptr;
+STC_TCInfo(struct rx_call *acid, struct tc_tcInfo *tciptr)
{
if (callPermitted(acid) == 0)
return (TC_NOTPERMITTED);
/* STC_DeleteDump
*/
afs_int32
-STC_DeleteDump(acid, dumpID, taskId)
- struct rx_call *acid;
- afs_uint32 dumpID;
- afs_uint32 *taskId;
+STC_DeleteDump(struct rx_call *acid, afs_uint32 dumpID, afs_uint32 *taskId)
{
struct deleteDumpIf *ptr = 0;
statusP statusPtr = 0;