projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 3.3.1
[debian/amanda]
/
server-src
/
amcheck-device.pl
diff --git
a/server-src/amcheck-device.pl
b/server-src/amcheck-device.pl
index a27d006148ba4e4880dd787f20bb3995c01cd55b..3a72bbe0053a0296889163fc22edb45fc589dc91 100644
(file)
--- a/
server-src/amcheck-device.pl
+++ b/
server-src/amcheck-device.pl
@@
-38,6
+38,7
@@
my $config_overrides = new_config_overrides($#ARGV+1);
my $overwrite = 0;
Getopt::Long::Configure(qw{bundling});
GetOptions(
my $overwrite = 0;
Getopt::Long::Configure(qw{bundling});
GetOptions(
+ 'version' => \&Amanda::Util::version_opt,
'o=s' => sub { add_config_override_opt($config_overrides, $_[1]); },
'w' => \$overwrite,
) or usage();
'o=s' => sub { add_config_override_opt($config_overrides, $_[1]); },
'w' => \$overwrite,
) or usage();
@@
-167,11
+168,20
@@
sub do_check {
step result_cb => sub {
(my $err, $res, $label, $mode) = @_;
step result_cb => sub {
(my $err, $res, $label, $mode) = @_;
- return failure($err, $finished_cb) if $err;
+ if ($err) {
+ if ($res) {
+ $res->release(finished_cb => sub {
+ return failure($err, $finished_cb);
+ });
+ return;
+ } else {
+ return failure($err, $finished_cb);
+ }
+ }
my $modestr = ($mode == $ACCESS_APPEND)? "append" : "write";
my $slot = $res->{'this_slot'};
my $modestr = ($mode == $ACCESS_APPEND)? "append" : "write";
my $slot = $res->{'this_slot'};
- if (defined $res->{'device'}->volume_label()) {
+ if (defined $res->{'device'}
and defined $res->{'device'}
->volume_label()) {
print "Will $modestr to volume '$label' in slot $slot.\n";
} else {
print "Will $modestr label '$label' to new volume in slot $slot.\n";
print "Will $modestr to volume '$label' in slot $slot.\n";
} else {
print "Will $modestr label '$label' to new volume in slot $slot.\n";