if (Buf == NULL) {
STREAM_CLOSE(afile);
FDH_CLOSE(fdP);
- return 1;
+ return -1;
}
memset((char *)Buf, 0, nVnodes * sizeof(afs_int32));
STREAM_SEEK(afile, offset = vcp->diskSize, 0);
delo = ProcessIndex(vp, vLarge, &b1, &s1, 0);
if (!delo)
delo = ProcessIndex(vp, vSmall, &b2, &s2, 0);
- if (delo) {
- if (b1)
- free((char *)b1);
- if (b2)
- free((char *)b2);
- b1 = b2 = NULL;
- s1 = s2 = 0;
+ if (delo < 0) {
+ Log("1 Volser: RestoreVolume: ProcessIndex failed; not restored\n");
+ error = VOLSERREAD_DUMPERROR;
+ goto out;
}
strncpy(vol.name, cookie->name, VOLSER_OLDMAXVOLNAME);
vol.cloneId = cookie->clone;
vol.parentId = cookie->parent;
-
tdelo = delo;
while (1) {
if (ReadVnodes(iodp, vp, 0, b1, s1, b2, s2, tdelo)) {
if (!delo) {
delo = ProcessIndex(vp, vLarge, &b1, &s1, 1);
if (!delo)
- ProcessIndex(vp, vSmall, &b2, &s2, 1);
- if (delo) {
+ delo = ProcessIndex(vp, vSmall, &b2, &s2, 1);
+ if (delo < 0) {
error = VOLSERREAD_DUMPERROR;
goto clean;
}
vp = tt->volume;
strcpy(tt->lastProcName, "ForwardMulti");
- /* (fromDate == 0) ==> incremental dump */
- is_incremental = (fromDate ? 1 : 0);
+ /* (fromDate == 0) ==> full dump */
+ is_incremental = ((V_parentId(vp) == V_id(vp) && fromDate) ? 1 : 0);
i = results->manyResults_len = destinations->manyDests_len;
results->manyResults_val = codes =