summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Hrdina <phrdina@redhat.com>2016-05-06 13:55:15 +0200
committerPavel Hrdina <phrdina@redhat.com>2016-05-06 15:48:38 +0200
commit0e2b834073837e6819bacfa4014465ce849613d1 (patch)
treedfcaf09a2399c7f06c13da79b63c5a7a7d6049a4
parent5e57b02bacf634927c7c5e8593792249c21899f2 (diff)
downloadlibvirt-0e2b834073837e6819bacfa4014465ce849613d1.tar.gz
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>
-rw-r--r--src/conf/domain_conf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index cc99301cfc..7fcaafeb42 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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) {