diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 2010-03-11 09:42:07 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 2010-03-11 09:42:07 +0000 |
commit | 08acf5c407242344b0047b8040900f52df620dde (patch) | |
tree | 49936ec28d8b2a4256959f13245d757df97e04bd /misc/amanda32-server/files/extra-patch-application-src::amzfs-sendrecv.pl | |
parent | bdce4d94e267612e2955a9270d4659712a679dea (diff) | |
download | ports-release/7.3.0.tar.gz ports-release/7.3.0.zip |
This commit was manufactured by cvs2svn to create tag 'RELEASE_7_3_0'.release/7.3.0
Diffstat (limited to 'misc/amanda32-server/files/extra-patch-application-src::amzfs-sendrecv.pl')
-rw-r--r-- | misc/amanda32-server/files/extra-patch-application-src::amzfs-sendrecv.pl | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/misc/amanda32-server/files/extra-patch-application-src::amzfs-sendrecv.pl b/misc/amanda32-server/files/extra-patch-application-src::amzfs-sendrecv.pl deleted file mode 100644 index 0a19153747d9..000000000000 --- a/misc/amanda32-server/files/extra-patch-application-src::amzfs-sendrecv.pl +++ /dev/null @@ -1,52 +0,0 @@ ---- application-src/amzfs-sendrecv.pl.orig 2009-01-22 02:35:38.000000000 +0100 -+++ application-src/amzfs-sendrecv.pl 2009-01-31 10:37:59.495534563 +0100 -@@ -235,13 +235,48 @@ - } elsif (defined $errmsg) { - $self->print_to_server_and_die($action, $errmsg, $Amanda::Script_App::ERROR); - } else { -- $self->print_to_server_and_die($action, "cannot estimate snapshot '$self->{snapshot}\@$self->{snapshot}': unknown reason", $Amanda::Script_App::ERROR); -+ $self->print_to_server_and_die($action, "cannot estimate snapshot '$self->{snapshot}\@$self->{snapshot}': unknown reason", $Amanda::Script_App::ERROR); - } - } -+ if ($level == 0) { -+ my $compratio = $self->get_compratio(); -+ $msg *= int $compratio; -+ } - - return $msg; - } - -+sub get_compratio -+{ -+ my $self = shift; -+ my $action = shift; -+ -+ my $cmd; -+ $cmd = "$self->{pfexec_cmd} $self->{zfs_path} get -Hp -o value compressratio $self->{filesystem}\@$self->{snapshot}"; -+ debug "running (get-compression): $cmd"; -+ my($wtr, $rdr, $err, $pid); -+ $err = Symbol::gensym; -+ $pid = open3($wtr, $rdr, $err, $cmd); -+ close $wtr; -+ my ($msg) = <$rdr>; -+ my ($errmsg) = <$err>; -+ waitpid $pid, 0; -+ close $rdr; -+ close $err; -+ if ($? != 0) { -+ if (defined $msg && defined $errmsg) { -+ $self->print_to_server_and_die($action, "$msg, $errmsg", $Amanda::Script_App::ERROR); -+ } elsif (defined $msg) { -+ $self->print_to_server_and_die($action, $msg, $Amanda::Script_App::ERROR); -+ } elsif (defined $errmsg) { -+ $self->print_to_server_and_die($action, $errmsg, $Amanda::Script_App::ERROR); -+ } else { -+ $self->print_to_server_and_die($action, "cannot read compression ratio '$self->{snapshot}\@$self->{snapshot}': unknown reason", $Amanda::Script_App::ERROR); -+ } -+ } -+ return $msg -+} -+ - sub command_index_from_output { - } - |