mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +00:00
qemuMigrationCookieNBDXMLFormat: Format empty <nbd/> element
Commit 518be41aaa3 refactored qemuMigrationCookieNBDXMLFormat to use virXMLFormatElement which in comparison to the previous code doesn't format the element if it's empty. Unfortunately some crusty bits of our migration code use questionable logic to assert use of the old-style storage migration parameters which breaks if no disks are being migrated and the <nbd/> element is not present. While later patches will fix the code, re-instate formatting of empty <nbd/> for increased compatibility. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> Tested-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1ac21ab7ea
commit
7c6d462aae
@ -790,7 +790,7 @@ qemuMigrationCookieNBDXMLFormat(qemuMigrationCookieNBD *nbd,
|
||||
virBufferAsprintf(&childBuf, " capacity='%llu'/>\n", nbd->disks[i].capacity);
|
||||
}
|
||||
|
||||
virXMLFormatElement(buf, "nbd", &attrBuf, &childBuf);
|
||||
virXMLFormatElementEmpty(buf, "nbd", &attrBuf, &childBuf);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user