}
record_seen_dump(tape_seen, source.header);
restore(&source, flags);
+ if (first_restored_file) {
+ memcpy(first_restored_file, source.header, sizeof(dumpfile_t));
+ }
return RESTORE_STATUS_NEXT_FILE;
}
if (last_header != NULL && !flags->amidxtaped &&
flags->pipe_to_fd == STDOUT_FILENO &&
+ last_header->type != F_UNKNOWN &&
!headers_equal(last_header, source.header, 1)) {
return FALSE;
} else if (this_header != NULL) {
cur_volume, &seentapes,
NULL, &first_restored_file, NULL);
}
+ if (flags->pipe_to_fd == fileno(stdout)) {
+ break;
+ }
} else {
Device * device = NULL;
if (use_changer) {
cur_volume, dumpspecs, &seentapes,
&first_restored_file, 0, logstream)) {
g_object_unref(device);
- break;;
+ break;
}
g_object_unref(device);
}
int tape_count = 0;
dumpfile_t first_restored_file;
+ fh_init(&first_restored_file);
+
/* This loop also aborts if we run out of manual tapes, or
encounter a changer error. */
for (;;) {