this was the only user, and it's easy enough

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 PVE/QemuServer/USB.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm
index 49957444..ecd0361d 100644
--- a/PVE/QemuServer/USB.pm
+++ b/PVE/QemuServer/USB.pm
@@ -5,6 +5,7 @@ use warnings;
 use PVE::QemuServer::PCI qw(print_pci_addr);
 use PVE::QemuServer::Machine;
 use PVE::QemuServer::Helpers qw(min_version windows_version);
+use PVE::INotify;
 use PVE::JSONSchema;
 use PVE::Mapping::USB;
 use base 'Exporter';
@@ -91,7 +92,9 @@ sub parse_usb_device {
            $res->{spice} = 1;
        }
     } elsif (defined($mapping)) {
-       my $devices = PVE::Mapping::USB::find_on_current_node($mapping);
+       my $config = PVE::Mapping::USB::config();
+       my $node = PVE::INotify::nodename();
+       my $devices = PVE::Mapping::USB::get_node_mapping($config, $mapping, 
$node);
        die "USB device mapping not found for '$mapping'\n" if !$devices || 
!scalar($devices->@*);
        die "More than one USB mapping per host not supported\n" if 
scalar($devices->@*) > 1;
        eval {
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to