From ff69c6602269a32b496069ae7700f6fd10fc6577 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 2 Aug 2018 14:41:37 +0200 Subject: [PATCH] LIO: followup: shorter stderr/out logging Signed-off-by: Thomas Lamprecht --- PVE/Storage/LunCmd/LIO.pm | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/PVE/Storage/LunCmd/LIO.pm b/PVE/Storage/LunCmd/LIO.pm index 80348b2..9686582 100644 --- a/PVE/Storage/LunCmd/LIO.pm +++ b/PVE/Storage/LunCmd/LIO.pm @@ -54,15 +54,8 @@ my $execute_remote_command = sub { $timeout = 10 if !$timeout; - my $output = sub { - my $line = shift; - $msg .= "$line\n"; - }; - - my $errfunc = sub { - my $line = shift; - $err .= "$line"; - }; + my $output = sub { $msg .= "$_[0]\n" }; + my $errfunc = sub { $err .= "$_[0]\n" }; $target = 'root@' . $scfg->{portal}; $cmd = [@ssh_cmd, '-i', "$id_rsa_path/$scfg->{portal}_id_rsa", $target, '--', $remote_command, @params]; @@ -97,15 +90,8 @@ my $read_config = sub { $timeout = 10 if !$timeout; - my $output = sub { - my $line = shift; - $msg .= "$line\n"; - }; - - my $errfunc = sub { - my $line = shift; - $err .= "$line"; - }; + my $output = sub { $msg .= "$_[0]\n" }; + my $errfunc = sub { $err .= "$_[0]\n" }; $target = 'root@' . $scfg->{portal}; -- 2.39.2