mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
domain_conf: fix migration/managedsave with usb keyboard
Commin 36785c7e refactored the code for input devices but introduced a
bug where we removed all keyboard from migratable XML. We have to
remove only implicit keyboards like PS2 or XEN.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
1 parent
5e57b02bac
commit
0e2b834073
1 file changed
+4
-2
@@ -21077,8 +21077,10 @@ virDomainInputDefFormat(virBufferPtr buf,
|
||||
const char *bus = virDomainInputBusTypeToString(def->bus);
|
||||
|
||||
/* don't format keyboard into migratable XML for backward compatibility */
|
||||
if (def->type == VIR_DOMAIN_INPUT_TYPE_KBD &&
|
||||
flags & VIR_DOMAIN_DEF_FORMAT_MIGRATABLE)
|
||||
if (flags & VIR_DOMAIN_DEF_FORMAT_MIGRATABLE &&
|
||||
def->type == VIR_DOMAIN_INPUT_TYPE_KBD &&
|
||||
(def->bus == VIR_DOMAIN_INPUT_BUS_PS2 ||
|
||||
def->bus == VIR_DOMAIN_INPUT_BUS_XEN))
|
||||
return 0;
|
||||
|
||||
if (!type) {
|
||||
|
||||
Reference in new issue
Block a user