* directory or online at http://www.openafs.org/dl/license10.html
*/
+#ifndef AFS_SRC_BUBASICS_BUTM_H
+#define AFS_SRC_BUBASICS_BUTM_H
+
#include <afs/auth.h>
#include <afs/bubasics.h>
#define butm_WriteEOT(i) (*((i)->ops.writeEOT))(i)
#define butm_SetSize(i,s) (*((i)->ops.setSize))(i,s)
#define butm_GetSize(i,s) (*((i)->ops.getSize))(i,s)
+
+#endif
afs_int32 aport);
extern int bc_DeleteTapeHost(struct bc_config *aconfig, char *aname,
afs_int32 aport);
+extern int bc_InitConfig(char *apath);
/* dsstub.c */
extern char *tailCompPtr(char *pathNamePtr);
extern int bcdb_FindTape(afs_int32 dumpid, char *tapeName,
struct budb_tapeEntry *teptr);
+extern afs_int32 udbClientInit(int noAuthFlag, int localauth, char *cellName);
+
+struct ktc_token;
+extern int vldbClientInit(int noAuthFlag, int localauth, char *cellName,
+ struct ubik_client **cstruct,
+ struct ktc_token *ttoken);
+
/* vol_sets.c */
extern afs_int32 bc_UpdateVolumeSet(void);
extern int bc_SaveVolumeSet(void);
#include <afs/com_err.h>
#include <afs/afsutil.h>
#include <afs/budb.h>
+#include <afs/budb_prototypes.h>
#include <afs/butc.h>
#include <afs/bubasics.h> /* PA */
#include <afs/volser.h>
char *timeString;
budb_dumpsList dumps, flags;
int i;
- afs_int32 port = -1, dbonly = 0, force;
+ afs_int32 port = -1, force;
/* Must specify at least one of -dumpid, -from, or -to */
if (!as->parms[0].items && !as->parms[1].items && !as->parms[2].items
{
register int i;
register afs_int32 code;
- void *junk;
+ void *junk = NULL;
for (i = 0; i < BC_MAXSIMDUMPS; i++)
if (!(bc_dumpTasks[i].flags & BC_DI_INUSE))
code =
LWP_CreateProcess(bc_DmpRstStart, 20480, LWP_NORMAL_PRIORITY,
- (void *)i, "helper", &junk);
+ (void *)i, "helper", junk);
if (code) {
bc_HandleMisc(code);
afs_com_err(whoami, code, "; Can't start thread");
#include "bc.h"
#include "error_macros.h"
#include "bucoord_internal.h"
+#include "bucoord_prototypes.h"
/* code to manage dump schedules
* specific to the ubik database implementation
#include <afs/vlserver.h>
#include <afs/butm.h>
#include <afs/butx.h>
+#include <afs/tcdata.h>
#include "bc.h" /*Backup Coordinator structs and defs */
#include "bucoord_internal.h"
}
initd = 1;
- code = bc_InitConfig(DefaultConfDir);
+ code = bc_InitConfig((char *)DefaultConfDir);
if (code) {
afs_com_err(whoami, code,
"Can't initialize from config files in directory '%s'",
#include "error_macros.h"
#include <errno.h>
#include "bucoord_internal.h"
+#include "bucoord_prototypes.h"
/* code to manage tape hosts
* specific to the ubik database implementation
#include "bc.h"
#include "error_macros.h"
#include "bucoord_internal.h"
+#include "bucoord_prototypes.h"
/* code to manage volumesets
* specific to the ubik database implementation
extern void volumeEntry_ntoh(struct budb_volumeEntry *,
struct budb_volumeEntry *);
extern int default_tapeset(struct budb_tapeSet *, char *);
+extern void printDumpEntry(struct budb_dumpEntry *deptr);
+extern void printTapeEntry(struct budb_tapeEntry *teptr);
+extern void printVolumeEntry(struct budb_volumeEntry *veptr);
#endif
int n;
int i;
int length;
- dbadr ta = NULL;
+ dbadr ta = 0;
if ((mht == 0)
|| ((ht = mht->ht) == 0)
}
afs_int32
-FillVolEntry(struct ubik_trans *ut, dbadr va, struct budb_volumeEntry *vol)
+FillVolEntry(struct ubik_trans *ut, dbadr va, void *rock)
{
+ struct budb_volumeEntry *vol = (struct budb_volumeEntry *) rock;
struct dump d;
struct tape t;
struct volInfo vi;
}
afs_int32
-FillDumpEntry(struct ubik_trans *ut, dbadr da, struct budb_dumpEntry *dump)
+FillDumpEntry(struct ubik_trans *ut, dbadr da, void *rock)
{
+ struct budb_dumpEntry *dump = (struct budb_dumpEntry *)rock;
struct dump d, ad;
if (dbread(ut, da, &d, sizeof(d)))
}
afs_int32
-FillTapeEntry(struct ubik_trans *ut, dbadr ta, struct budb_tapeEntry *tape)
+FillTapeEntry(struct ubik_trans *ut, dbadr ta, void *rock)
{
+ struct budb_tapeEntry *tape=(struct budb_tapeEntry *) rock;
struct tape t;
struct dump d;
afs_int32 code;
SendReturnList(struct ubik_trans *ut,
struct returnList *list, /* list of elements to return */
afs_int32(*FillProc) (struct ubik_trans *, dbadr da,
- budb_dumpEntry *),
+ void *),
/* proc to fill entry */
int e_size, /* size of each element */
afs_int32 index, /* index from previous call */
extern char *opencallout;
extern char *closecallout;
extern char *whoami;
-extern char *extractDumpName();
+extern char *extractDumpName(char *);
extern int BufferSize; /* Size in B stored for header info */
FILE *restoretofilefd;
#ifdef xbsa
*/
afs_int32 TapeBlockSize;
afs_int32
-readData(usd_handle_t fid, char *data, afs_int32 totalSize, afs_int32 *errorP)
+readData(usd_handle_t fid, char *data, afs_uint32 totalSize, afs_int32 *errorP)
{
afs_int32 toread; /* Number of bytes to read */
- afs_int32 rSize; /* Total bytes read so far */
- afs_int32 tSize; /* Temporary size */
+ afs_uint32 rSize; /* Total bytes read so far */
+ afs_uint32 tSize; /* Temporary size */
afs_int32 rc; /* return code */
toread = totalSize; /* First, try to read all the data */
afs_int32 blockType)
{
afs_int32 code = 0, rc = 0;
- afs_int32 wsize;
+ afs_uint32 wsize;
struct tapeLabel *label;
struct fileMark *fmark;
struct blockMark *bmark;