From: Jiri Denemark Date: Wed, 20 Feb 2013 09:30:38 +0000 (+0100) Subject: qemu: Do not ignore mandatory features in migration cookie X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=69660042fb0b5c4409685ca8c2b26e2eb37abd0d;p=libvirt.git qemu: Do not ignore mandatory features in migration cookie Due to "feature"/"features" nasty typo, any features marked as mandatory by one side of a migration are silently considered optional by the other side. The following is the code that formats mandatory features in migration cookie: for (i = 0 ; i < QEMU_MIGRATION_COOKIE_FLAG_LAST ; i++) { if (mig->flagsMandatory & (1 << i)) virBufferAsprintf(buf, " \n", qemuMigrationCookieFlagTypeToString(i)); } --- diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 36e55d2e28..2f79358282 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -817,7 +817,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig, /* Check to ensure all mandatory features from XML are also * present in 'flags' */ - if ((n = virXPathNodeSet("./features", ctxt, &nodes)) < 0) + if ((n = virXPathNodeSet("./feature", ctxt, &nodes)) < 0) goto error; for (i = 0 ; i < n ; i++) {