mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-29 16:38:49 +00:00
USB: print_usbdevice_full: error out on invalid configuration
should not happen normally, but an inattentive user of that function may forget to check the validity of the parsed device, so err on the safe side here Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
238af88edc
commit
b06a24927c
@ -120,6 +120,8 @@ sub print_usbdevice_full {
|
|||||||
$usbdevice .= ",vendorid=0x$device->{vendorid},productid=0x$device->{productid}";
|
$usbdevice .= ",vendorid=0x$device->{vendorid},productid=0x$device->{productid}";
|
||||||
} elsif (defined($device->{hostbus}) && defined($device->{hostport})) {
|
} elsif (defined($device->{hostbus}) && defined($device->{hostport})) {
|
||||||
$usbdevice .= ",hostbus=$device->{hostbus},hostport=$device->{hostport}";
|
$usbdevice .= ",hostbus=$device->{hostbus},hostport=$device->{hostport}";
|
||||||
|
} else {
|
||||||
|
die "no usb id or path given\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$usbdevice .= ",id=$deviceid";
|
$usbdevice .= ",id=$deviceid";
|
||||||
|
Loading…
Reference in New Issue
Block a user