From 41af2dfc2592a33bc0d643fe3fdf2702d2ed4e3b Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 16 Oct 2020 17:53:28 +0200 Subject: [PATCH] PCI: use warnings/strict and fix setting $vga from config2command fixes commit 74c17b7a23c8a953d1dcec9bd53449d71d88cd5d which moved this code here, but forgot to pass $vga ref, as the module was not using warning nor strict mode this was not caught.. Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 2 +- PVE/QemuServer/PCI.pm | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 418a2a0..3be7e24 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3214,7 +3214,7 @@ sub config_to_command { # host pci device passthrough my ($kvm_off, $gpu_passthrough, $legacy_igd) = PVE::QemuServer::PCI::print_hostpci_devices( - $vmid, $conf, $devices, $winversion, $q35, $bridges, $arch, $machine_type, $bootorder); + $vmid, $conf, $devices, $vga, $winversion, $q35, $bridges, $arch, $machine_type, $bootorder); # usb devices my $usb_dev_features = {}; diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer/PCI.pm index 92adb90..2ee142f 100644 --- a/PVE/QemuServer/PCI.pm +++ b/PVE/QemuServer/PCI.pm @@ -1,5 +1,8 @@ package PVE::QemuServer::PCI; +use warnings; +use strict; + use PVE::JSONSchema; use PVE::SysFSTools; @@ -357,7 +360,7 @@ sub parse_hostpci { } sub print_hostpci_devices { - my ($vmid, $conf, $devices, $winversion, $q35, $bridges, $arch, $machine_type, $bootorder) = @_; + my ($vmid, $conf, $devices, $vga, $winversion, $q35, $bridges, $arch, $machine_type, $bootorder) = @_; my $kvm_off = 0; my $gpu_passthrough = 0; -- 2.39.2