From 128193e26a19171b5a01688b3ef5b63953560f3a Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 12 Dec 2019 13:38:55 +0100 Subject: [PATCH] followup: simplify log callback run_command only passes defined and chomped strings to the callback, so no need to do that twice. Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index c5330702..09a15597 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -5415,12 +5415,7 @@ sub vm_start { # errors that might occur and show the user if ($migratedfrom) { $run_params{quiet} = 1; - $run_params{logfunc} = sub { - my $msg = shift; - return if !$msg; - chomp $msg; - print "QEMU: $msg\n"; - }; + $run_params{logfunc} = sub { print "QEMU: $_[0]\n" }; } my %properties = (