- if ($image->{timestamp} ne $header->{datestamp} ||
- $image->{hostname} ne $header->{name} ||
- $image->{diskname} ne $header->{disk} ||
- $image->{level} != $header->{dumplevel} ||
- $image->{partnum} != $volume_part) {
- printf("Volume image is %s:%s datestamp %s level %s part %s\n",
- $header->{name}, $header->{disk}, $header->{datestamp},
- $header->{dumplevel}, $volume_part);
- $check->(0, sprintf("Details of dump at file %d of volume %s do not match logfile",
- $image->{filenum}, $image->{label}));
- }
-
- # get the validation application pipeline that will process this dump.
- (my $pipeline, $current_command) = open_validation_app($image, $header);
-
- # send the datastream from the device straight to the application
- my $queue_fd = Amanda::Device::queue_fd_t->new(fileno($pipeline));
- my $read_ok = $device->read_to_fd($queue_fd);
- $check->($device->status() == $DEVICE_STATUS_SUCCESS,
- "Error reading device: " . $device->error_or_status());
- # if we make it here, the device was ok, but the read perhaps wasn't
- if (!$read_ok) {
- my $errmsg = $queue_fd->{errmsg};
- if (defined $errmsg && length($errmsg) > 0) {
- $check->($read_ok, "Error writing data to validation command: $errmsg");