#include <afsconfig.h>
#include <afs/param.h>
-RCSID
- ("$Header$");
#include <afs/stds.h>
#include <sys/types.h>
#include <afs/budb.h>
#include <afs/vlserver.h>
#include "error_macros.h"
+#include "bucoord_internal.h"
+#include "bucoord_prototypes.h"
extern struct bc_dumpTask bc_dumpTasks[BC_MAXSIMDUMPS];
extern char *whoami;
};
struct volinfo {
- struct voli *next;
+ struct volinfo *next;
char *volname;
- afs_int32 server;
+ afs_uint32 server;
afs_int32 partition;
};
};
/* strip .backup from the end of a name */
-static
-StripBackup(aname)
- register char *aname;
+static int
+StripBackup(char *aname)
{
int j;
- if (j = BackupName(aname)) {
+ if ((j = BackupName(aname))) {
aname[j] = 0;
return 0;
}
}
int
-BackupName(aname)
- char *aname;
+BackupName(char *aname)
{
int j;
return 0;
}
-extractTapeSeq(tapename)
- char *tapename;
+int
+extractTapeSeq(char *tapename)
{
char *sptr;
return (atol(sptr));
}
-viceName(value)
- long value;
+void
+viceName(long value)
{
char *alph;
int r;
* entry:
* aindex - index into bc_dumpTasks that describes this dump.
*/
-bc_Restorer(aindex)
- afs_int32 aindex;
+int
+bc_Restorer(afs_int32 aindex)
{
struct bc_dumpTask *dumpTaskPtr;
afs_int32 tapedumpid, parent;
afs_int32 nentries = 0;
- afs_int32 last, next, ve, vecount;
+ afs_int32 last = 0;
+ afs_int32 next, ve, vecount;
struct bc_tapeItem *ti, *pti, *nti;
struct bc_tapeList *tapeList = (struct bc_tapeList *)0;
struct bc_tapeList *tle, *ptle, *ntle;
struct dumpinfo *dumpinfolist = NULL;
struct dumpinfo *pdi, *ndi, *di, *dlevels;
- struct volinfo *pvi, *nvi, *vi;
+ struct volinfo *nvi, *vi;
afs_int32 lvl, lv;
int num_dlevels = 20;
- afs_int32 serverAll; /* The server to which all volumes are to be restore to */
+ afs_uint32 serverAll; /* The server to which all volumes are to be restore to */
afs_int32 partitionAll; /* Likewise for partition */
struct hostent *hostPtr;
long haddr;
time_t did;
int foundtape, c;
- extern statusP createStatusNode();
- extern statusP findStatus();
-
dlevels = (struct dumpinfo *) malloc(num_dlevels * sizeof(*dlevels));
dumpTaskPtr = &bc_dumpTasks[aindex];
volumeEntries = (struct budb_volumeEntry *)
malloc(MAXTAPESATONCE * sizeof(struct budb_volumeEntry));
if (!volumeEntries) {
- afs_com_err(whoami, BC_NOMEM, "");
+ afs_com_err(whoami, BC_NOMEM, NULL);
ERROR(BC_NOMEM);
}
if (!di) {
di = (struct dumpinfo *)malloc(sizeof(struct dumpinfo));
if (!di) {
- afs_com_err(whoami, BC_NOMEM, "");
+ afs_com_err(whoami, BC_NOMEM, NULL);
ERROR(BC_NOMEM);
}
memset(di, 0, sizeof(struct dumpinfo));
/* Create one and thread into list */
vi = (struct volinfo *)malloc(sizeof(struct volinfo));
if (!vi) {
- afs_com_err(whoami, BC_NOMEM, "");
+ afs_com_err(whoami, BC_NOMEM, NULL);
ERROR(BC_NOMEM);
}
memset(vi, 0, sizeof(struct volinfo));
vi->volname = (char *)malloc(strlen(vname) + 1);
if (!vi->volname) {
free(vi);
- afs_com_err(whoami, BC_NOMEM, "");
+ afs_com_err(whoami, BC_NOMEM, NULL);
ERROR(BC_NOMEM);
}
tle = (struct bc_tapeList *)
malloc(sizeof(struct bc_tapeList));
if (!tle) {
- afs_com_err(whoami, BC_NOMEM, "");
+ afs_com_err(whoami, BC_NOMEM, NULL);
return (BC_NOMEM);
}
memset(tle, 0, sizeof(struct bc_tapeList));
+ 1);
if (!tle->tapeName) {
free(tle);
- afs_com_err(whoami, BC_NOMEM, "");
+ afs_com_err(whoami, BC_NOMEM, NULL);
return (BC_NOMEM);
}
ti = (struct bc_tapeItem *)
malloc(sizeof(struct bc_tapeItem));
if (!ti) {
- afs_com_err(whoami, BC_NOMEM, "");
+ afs_com_err(whoami, BC_NOMEM, NULL);
return (BC_NOMEM);
}
memset(ti, 0, sizeof(struct bc_tapeItem));
+ 1);
if (!ti->volumeName) {
free(ti);
- afs_com_err(whoami, BC_NOMEM, "");
+ afs_com_err(whoami, BC_NOMEM, NULL);
return (BC_NOMEM);
}
(struct tc_restoreDesc *)malloc(nentries *
sizeof(struct tc_restoreDesc));
if (!tcarray) {
- afs_com_err(whoami, BC_NOMEM, "");
+ afs_com_err(whoami, BC_NOMEM, NULL);
ERROR(BC_NOMEM);
}
memset(tcarray, 0, nentries * sizeof(struct tc_restoreDesc));