X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famlabel.pl;h=98c5c7847204baec25c77c99a60b3e0d7cb14f7b;hb=refs%2Ftags%2Fupstream%2F3.3.1;hp=77a5115c49e4b61825d43203ba8032266f2fe066;hpb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;p=debian%2Famanda diff --git a/server-src/amlabel.pl b/server-src/amlabel.pl index 77a5115..98c5c78 100644 --- a/server-src/amlabel.pl +++ b/server-src/amlabel.pl @@ -57,8 +57,11 @@ $opt_force = 0; $opt_barcode = undef; $opt_meta = undef; $opt_assign = undef; + +debug("Arguments: " . join(' ', @ARGV)); Getopt::Long::Configure(qw(bundling)); GetOptions( + 'version' => \&Amanda::Util::version_opt, 'help|usage|?' => \&usage, 'o=s' => sub { add_config_override_opt($config_overrides, $_[1]); }, 'f' => \$opt_force, @@ -68,7 +71,7 @@ GetOptions( 'version' => \&Amanda::Util::version_opt, ) or usage(); -if ($opt_assign && (!$opt_meta || !$opt_barcode)) { +if ($opt_assign && (!$opt_meta and !$opt_barcode)) { print STDERR "--assign require --barcode or --meta\n"; usage(); } @@ -297,7 +300,7 @@ sub main { # update the tapelist $tl->reload(1); $tl->remove_tapelabel($label); - $tl->add_tapelabel("0", $label, undef, 1, $meta, $res->{'barcode'}); + $tl->add_tapelabel("0", $label, undef, 1, $meta, $res->{'barcode'}, $dev->block_size/1024); $tl->write(); print "Success!\n";