search for: _volume_copy

Displaying 3 results from an estimated 3 matches for "_volume_copy".

2011 Jan 20
1
[PATCH] Don't display a progress bar if stderr isn't on a tty
...+++++++++-------- 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/lib/Sys/VirtV2V/Connection/Source.pm b/lib/Sys/VirtV2V/Connection/Source.pm index 4f94e20..5216503 100644 --- a/lib/Sys/VirtV2V/Connection/Source.pm +++ b/lib/Sys/VirtV2V/Connection/Source.pm @@ -126,9 +126,20 @@ sub _volume_copy # Copy the contents of the source stream to the destination stream my $total = 0; - my $progress = new Term::ProgressBar({name => $src->get_name(), - count => $expected, - ETA => 'linear...
2011 Mar 11
2
[PATCH 1/2] Allow reading more data than the reported size of a volume
...Source.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Sys/VirtV2V/Connection/Source.pm b/lib/Sys/VirtV2V/Connection/Source.pm index 960aff3..8cbfe25 100644 --- a/lib/Sys/VirtV2V/Connection/Source.pm +++ b/lib/Sys/VirtV2V/Connection/Source.pm @@ -167,7 +167,7 @@ sub _volume_copy v2vdie __x('Didn\'t receive full volume. Received {received} '. 'of {total} bytes.', received => $total, total => $src->get_size()) - if $src->get_format() eq "raw" && $total != $src->get_size(); +...
2010 Sep 21
1
[PREVIEW ONLY] Refactor data transfer code
...9;t be instantiated directly. Use one of the +subclasses: - Sys::VirtV2V::Connection::LibVirt - Sys::VirtV2V::Connection::LibVirtXML + Sys::VirtV2V::Target::LibVirtSource + Sys::VirtV2V::Source::LibVirtXML =head1 METHODS @@ -102,14 +99,58 @@ sub get_dom return $self->{dom}; } +sub _volume_copy +{ + my ($src, $dst) = @_; + + my $src_s; + my $dst_s; + + # Can we just do a straight copy? + if ($src->get_format() eq $dst->get_format()) { + $src_s = $src->get_read_stream(); + $dst_s = $dst->get_write_stream(); + } + + else { + die("Di...