From 871ebe177516a4ac09f9b64a1d2c5f40b7e6de76 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 10 Nov 2022 16:48:35 +0100 Subject: [PATCH] usb: rename check_usb_index into assert_usb_index_is_useable to better convey that this might die Signed-off-by: Thomas Lamprecht --- PVE/QemuServer/USB.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/QemuServer/USB.pm b/PVE/QemuServer/USB.pm index 7def04d2..82082a17 100644 --- a/PVE/QemuServer/USB.pm +++ b/PVE/QemuServer/USB.pm @@ -37,7 +37,7 @@ sub parse_usb_device { return $res; } -my sub check_usb_index { +my sub assert_usb_index_is_useable { my ($index, $use_qemu_xhci) = @_; die "using usb$index is only possible with machine type >= 7.1 and ostype l26 or windows > 7\n" @@ -83,7 +83,7 @@ sub get_usb_controllers { my $use_usb = 0; for (my $i = 0; $i < $max_usb_devices; $i++) { next if !$conf->{"usb$i"}; - check_usb_index($i, $use_qemu_xhci); + assert_usb_index_is_useable($i, $use_qemu_xhci); my $d = eval { PVE::JSONSchema::parse_property_string($format,$conf->{"usb$i"}) }; next if !$d; $use_usb = 1; @@ -112,7 +112,7 @@ sub get_usb_devices { for (my $i = 0; $i < $max_usb_devices; $i++) { my $devname = "usb$i"; next if !$conf->{$devname}; - check_usb_index($i, $use_qemu_xhci); + assert_usb_index_is_useable($i, $use_qemu_xhci); my $d = eval { PVE::JSONSchema::parse_property_string($format,$conf->{$devname}) }; next if !$d;