X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=perl%2FAmanda%2FTapelist.pm;h=26803117b58f9eed59adaaa4dde491af47fdf765;hb=refs%2Ftags%2Fupstream%2F3.3.1;hp=b028127ad60882c05382a0745a2f6bd1e10a5737;hpb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;p=debian%2Famanda diff --git a/perl/Amanda/Tapelist.pm b/perl/Amanda/Tapelist.pm index b028127..2680311 100644 --- a/perl/Amanda/Tapelist.pm +++ b/perl/Amanda/Tapelist.pm @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.39 +# Version 2.0.4 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -309,7 +309,7 @@ sub remove_tapelabel { sub add_tapelabel { my $self = shift; - my ($datestamp, $label, $comment, $reuse, $meta, $barcode) = @_; + my ($datestamp, $label, $comment, $reuse, $meta, $barcode, $blocksize) = @_; $reuse = 1 if !defined $reuse; # prepend this (presumably new) volume to the beginning of the list @@ -319,6 +319,7 @@ sub add_tapelabel { 'reuse' => $reuse, 'barcode' => $barcode, 'meta' => $meta, + 'blocksize' => $blocksize, 'comment' => $comment, }; my $tles = $self->{'tles'}; @@ -357,8 +358,9 @@ sub write { my $reuse = $tle->{'reuse'} ? 'reuse' : 'no-reuse'; my $barcode = (defined $tle->{'barcode'})? (" BARCODE:" . $tle->{'barcode'}) : ''; my $meta = (defined $tle->{'meta'})? (" META:" . $tle->{'meta'}) : ''; + my $blocksize = (defined $tle->{'blocksize'})? (" BLOCKSIZE:" . $tle->{'blocksize'}) : ''; my $comment = (defined $tle->{'comment'})? (" #" . $tle->{'comment'}) : ''; - $result &&= print $fhn "$datestamp $label $reuse$barcode$meta$comment\n"; + $result &&= print $fhn "$datestamp $label $reuse$barcode$meta$blocksize$comment\n"; } my $result_close = close($fhn); $result &&= $result_close; @@ -410,8 +412,8 @@ sub _read_tapelist { my @tles; open(my $fh, "<", $self->{'filename'}) or return $self; while (my $line = <$fh>) { - my ($datestamp, $label, $reuse, $barcode, $meta, $comment) - = $line =~ m/^([0-9]*)\s([^\s]*)\s(reuse|no-reuse)\s*(?:BARCODE:([^\s]*))?\s*(?:META:([^\s]*))?\s*(?:\#(.*))?$/mx; + my ($datestamp, $label, $reuse, $barcode, $meta, $blocksize, $comment) + = $line =~ m/^([0-9]*)\s([^\s]*)\s(reuse|no-reuse)\s*(?:BARCODE:([^\s]*))?\s*(?:META:([^\s]*))?\s*(?:BLOCKSIZE:([^\s]*))?\s*(?:\#(.*))?$/mx; next if !defined $datestamp; # silently filter out bogus lines push @tles, { 'datestamp' => $datestamp, @@ -419,6 +421,7 @@ sub _read_tapelist { 'reuse' => ($reuse eq 'reuse'), 'barcode' => $barcode, 'meta' => $meta, + 'blocksize' => $blocksize, 'comment' => $comment, }; }