#include <rx/rx.h>
#include <afs/afsint.h>
#include <stdio.h>
+#include <string.h>
#include <afs/procmgmt.h>
#include <afs/assert.h>
#include <afs/prs_fs.h>
#include <afs/nfs.h>
#include <lwp.h>
#include <lock.h>
-#include <afs/auth.h>
#include <afs/cellconfig.h>
#include <afs/keys.h>
#include <ubik.h>
extern int dump_namecheck;
extern int autoQuery;
+static void initTapeBuffering();
+static writeDbDump();
+static restoreDbEntries();
+
+void * KeepAlive(void *);
/* CreateDBDump
* create a dump entry for a saved database
*/
extern struct tapeConfig globalTapeConfig;
extern struct udbHandleS udbHandle;
- extern int KeepAlive();
-
blockSize = BUTM_BLKSIZE;
writeBlock = (char *)malloc(BUTM_BLOCKSIZE);
if (!writeBlock)
* dump backup database to tape
*/
-afs_int32
-saveDbToTape(saveDbIfPtr)
- struct saveDbIf *saveDbIfPtr;
+void *
+saveDbToTape(void *param)
{
+ struct saveDbIf *saveDbIfPtr = (struct saveDbIf *)param;
afs_int32 code = 0;
afs_int32 i;
int wroteLabel;
free(saveDbIfPtr);
LeaveDeviceQueue(deviceLatch);
- return (code);
+ return (void *)(code);
}
struct rstTapeInfo {
}
static afs_int32 nbytes = 0; /* # bytes left in buffer */
-static
+static void
initTapeBuffering()
{
nbytes = 0;
* restore the backup database from tape.
*/
-afs_int32
-restoreDbFromTape(taskId)
- afs_uint32 taskId;
+void *
+restoreDbFromTape(void *param)
{
+ afs_uint32 taskId = (afs_uint32) param;
afs_int32 code = 0;
afs_int32 i;
struct butm_tapeInfo tapeInfo;
LeaveDeviceQueue(deviceLatch);
setStatus(taskId, TASK_DONE);
- return (code);
+ return (void *)(code);
}
/* KeepAlive
*
* Use the same udbHandle as writeDbDump so we go to the same server.
*/
-int
-KeepAlive()
+void *
+KeepAlive(void *unused)
{
charListT charList;
afs_int32 code;
/* Add the database header to the database */
code =
- ubik_Call(BUDB_RestoreDbHeader, udbHandle.uh_client, 0,
+ ubik_BUDB_RestoreDbHeader(udbHandle.uh_client, 0,
&hostDbHeader);
if (code) {
ErrorLog(0, rstTapeInfoPtr->taskId, code, 0,