mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-10-04 17:01:46 +00:00
usb: small style/code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
e68881e4a3
commit
342f049352
@ -107,10 +107,7 @@ sub get_usb_devices {
|
||||
my $d = eval { PVE::JSONSchema::parse_property_string($format,$conf->{$devname}) };
|
||||
next if !$d;
|
||||
|
||||
my $port;
|
||||
if ($use_qemu_xhci) {
|
||||
$port = $i + 1;
|
||||
}
|
||||
my $port = $use_qemu_xhci ? $i + 1 : undef;
|
||||
|
||||
if (defined($d->{host})) {
|
||||
my $hostdevice = parse_usb_device($d->{host});
|
||||
@ -154,7 +151,7 @@ sub print_usbdevice_full {
|
||||
my $usbdevice = "usb-host";
|
||||
|
||||
# if it is a usb3 device or with newer qemu, attach it to the xhci controller, else omit the bus option
|
||||
if($device->{usb3} || defined($port)) {
|
||||
if ($device->{usb3} || defined($port)) {
|
||||
$usbdevice .= ",bus=xhci.0";
|
||||
$usbdevice .= ",port=$port" if defined($port);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user