mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
libxl: fix regression introduced by commit 4ab8cd77
Commit 4ab8cd77
added a check requiring input devices to have
a bus type of VIR_DOMAIN_INPUT_BUS_USB, failing to start the
domain otherwise. But virDomainDefParseXML adds implicit mouse
and keyboard if a graphics device is configured. See calls to
virDomainDefMaybeAddInput.
The regression is fixed by removing the check requiring USB input
devices, and skipping non-USB input devices when populating USB
'usbdevice' in libxl_domain_build_info struct.
This commit is contained in:
parent
ee744b5b38
commit
a7d6b94a00
@ -750,13 +750,6 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
|
||||
libxl_defbool_set(&b_info->u.hvm.sdl.enable, 0);
|
||||
|
||||
if (def->ninputs) {
|
||||
for (i = 0; i < def->ninputs; i++) {
|
||||
if (def->inputs[i]->bus != VIR_DOMAIN_INPUT_BUS_USB) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("libxenlight supports only USB input"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#ifdef LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST
|
||||
if (VIR_ALLOC_N(b_info->u.hvm.usbdevice_list, def->ninputs+1) < 0)
|
||||
return -1;
|
||||
@ -769,6 +762,10 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
|
||||
#endif
|
||||
for (i = 0; i < def->ninputs; i++) {
|
||||
char **usbdevice;
|
||||
|
||||
if (def->inputs[i]->bus != VIR_DOMAIN_INPUT_BUS_USB)
|
||||
continue;
|
||||
|
||||
#ifdef LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST
|
||||
usbdevice = &b_info->u.hvm.usbdevice_list[i];
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user