my $scribe = Amanda::Taper::Scribe->new(
taperscan => $controller->{'taperscan'},
feedback => $self,
- debug => $Amanda::Config::debug_taper);
+ debug => $Amanda::Config::debug_taper,
+ eject_volume => getconf($CNF_EJECT_VOLUME));
$self->{'scribe'} = $scribe;
$self->{'scribe'}->start(write_timestamp => $write_timestamp,
}
}
+sub CLOSE_VOLUME {
+ my $self = shift;
+ my ($msgtype, %params) = @_;
+
+ $self->_assert_in_state("idle") or return;
+
+ $self->{'scribe'}->close_volume();
+}
+
sub result_cb {
my $self = shift;
my %params = %{$self->{'dump_params'}};
# TODO: if $params{error} is set, report it back to the driver
# (this will be a change to the protocol)
- log_add($L_INFO, $params{'error'}) if defined $params{'error'};
+ log_add($L_INFO, "$params{'error'}") if defined $params{'error'};
if ($params{'volume_label'}) {
$self->{'label'} = $params{'volume_label'};
my $self = shift;
my %params = @_;
- log_add($L_INFO, $params{'message'});
+ debug("$params{'message'}");
+ log_add($L_INFO, "$params{'message'}");
}
##
if ($xmsg->{'type'} == $XMSG_INFO) {
info($xmsg->{'message'});
} elsif ($xmsg->{'type'} == $XMSG_ERROR) {
- $errmsg = $xmsg->{'messsage'};
+ $errmsg = $xmsg->{'message'};
} elsif ($xmsg->{'type'} == $XMSG_DONE) {
if ($errmsg) {
$finished_cb->($errmsg);