mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-07-03 08:53:02 +00:00
usb: fix undef error on string match
'$entry->{host}' can be empty, so we have to check for that before doing a regex check, otherwise we get ugly errors in the log Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
7299e18567
commit
f0923f49e9
@ -2597,7 +2597,7 @@ sub check_local_resources {
|
|||||||
foreach my $k (keys %$conf) {
|
foreach my $k (keys %$conf) {
|
||||||
if ($k =~ m/^usb/) {
|
if ($k =~ m/^usb/) {
|
||||||
my $entry = parse_property_string('pve-qm-usb', $conf->{$k});
|
my $entry = parse_property_string('pve-qm-usb', $conf->{$k});
|
||||||
next if $entry->{host} =~ m/^spice$/i;
|
next if $entry->{host} && $entry->{host} =~ m/^spice$/i;
|
||||||
if ($entry->{mapping}) {
|
if ($entry->{mapping}) {
|
||||||
$add_missing_mapping->('usb', $k, $entry->{mapping});
|
$add_missing_mapping->('usb', $k, $entry->{mapping});
|
||||||
push @$mapped_res, $k;
|
push @$mapped_res, $k;
|
||||||
|
Loading…
Reference in New Issue
Block a user