afs_uint32 nBytes;
};
-/* Forward declarations */
-int writeData(char *data, afs_int32 size);
-
/* Read a tape block of size 16K */
afs_int32
readblock(char *buffer)
return 0;
}
+static void
+writeData(char *data, afs_int32 size)
+{
+ int rc;
+ u_int nwritten;
+
+ if (!ofdIsOpen)
+ return;
+ rc = USD_WRITE(ofd, data, (u_int) size, &nwritten);
+ if (rc != 0) {
+ fprintf(stderr, "Unable to write volume data to file. Code = %d\n",
+ rc);
+ }
+ return;
+}
+
int
writeLastBlocks(char *lastblock, char *lastblock2)
{
- int rc;
char trailer[12];
struct blockMark *bmark, *bmark2;
char *data;
fprintf(stderr, "Failed to strip off volume trailer (2).\n");
} else {
if (count2 - tlen > 0) {
- rc = writeData(data2, count2 - tlen);
+ writeData(data2, count2 - tlen);
}
if ((tlen == 0) && (count > 12 - pos)) {
- rc = writeData(data, count - (12 - pos));
+ writeData(data, count - (12 - pos));
}
}
return 0;
return 0;
}
-int
-writeData(char *data, afs_int32 size)
-{
- int rc;
- u_int nwritten;
-
- if (!ofdIsOpen)
- return 0;
- rc = USD_WRITE(ofd, data, (u_int) size, &nwritten);
- if (rc != 0) {
- fprintf(stderr, "Unable to write volume data to file. Code = %d\n",
- rc);
- }
- return 0;
-}
-
static int
WorkerBee(struct cmd_syndesc *as, void *arock)
{
if (lastblock2 != NULL) {
data = &lastblock2[sizeof(struct blockMark)];
bmark = (struct blockMark *)lastblock2;
- code = writeData(data, ntohl(bmark->count));
+ writeData(data, ntohl(bmark->count));
tblock = lastblock2;
} else if (lastblock != NULL) {
tblock = tapeblock2;
struct budb_tapeEntry netTapeEntry, hostTapeEntry;
struct budb_volumeEntry netVolumeEntry, hostVolumeEntry;
struct structDumpHeader netItemHeader;
- afs_int32 taskId;
int restoreThisDump = 1;
afs_int32 code = 0;
extern struct udbHandleS udbHandle;
- taskId = rstTapeInfoPtr->taskId;
-
/* read dump entry */
memset(&netDumpEntry, 0, sizeof(netDumpEntry));
code =