mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-04-30 13:20:22 +00:00
USB: use machine_type_is_q35 instead of regex
we refactored that into PVE::QemuServer::Machine a while ago, so we can use it here Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
b06a24927c
commit
3deccbd7d0
@ -3,6 +3,7 @@ package PVE::QemuServer::USB;
|
||||
use strict;
|
||||
use warnings;
|
||||
use PVE::QemuServer::PCI qw(print_pci_addr);
|
||||
use PVE::QemuServer::Machine;
|
||||
use PVE::JSONSchema;
|
||||
use base 'Exporter';
|
||||
|
||||
@ -42,7 +43,7 @@ sub get_usb_controllers {
|
||||
if ($arch eq 'aarch64') {
|
||||
$pciaddr = print_pci_addr('ehci', $bridges, $arch, $machine);
|
||||
push @$devices, '-device', "usb-ehci,id=ehci$pciaddr";
|
||||
} elsif ($machine !~ /q35/) { # FIXME: combine this and machine_type_is_q35
|
||||
} elsif (!PVE::QemuServer::Machine::machine_type_is_q35($conf)) {
|
||||
$pciaddr = print_pci_addr("piix3", $bridges, $arch, $machine);
|
||||
push @$devices, '-device', "piix3-usb-uhci,id=uhci$pciaddr.0x2";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user