[libvirt] [PATCH v2 4/5] domain: Define explicit flags for saved image xml
Eric Blake
eblake at redhat.com
Tue Feb 19 20:27:06 UTC 2019
On 2/19/19 1:44 PM, John Ferlan wrote:
>
>
> On 2/14/19 4:29 PM, Eric Blake wrote:
>> Commit d2a929d4 (0.9.4) defined virDomainSaveImageGetXMLDesc()'s use
>> of @flags as a subset of virDomainXMLFlags, documenting that 2 of the
>> 3 flags defined at the time would never be valid. Later, commit
>> 28f8dfdc (1.0.0) introduced a new flag, VIR_DOMAIN_XML_MIGRATABLE, but
>> did not adjust the save image documentation to declare it as invalid.
>> Later, commit a67e3872 (3.7.0) blindly copied and pasted the same text
>> into virDomainManagedSaveGetXMLDesc.
>>
>> ---
>> include/libvirt/libvirt-domain.h | 5 +++++
>> src/libvirt-domain.c | 14 ++++++--------
>> src/qemu/qemu_driver.c | 4 ++--
>> src/remote/remote_protocol.x | 4 ++--
>> 4 files changed, 15 insertions(+), 12 deletions(-)
>>
>
> mea culpa and missa something that the subsequent patch points out ;-)
>
> The virDomainSaveImageGetXMLDesc and virDomainManagedSaveGetXMLDesc
> source code should use:
>
> if ((conn->flags & VIR_CONNECT_RO) && (flags &
> VIR_DOMAIN_SAVE_IMAGE_XML_SECURE)) {
>
> and not
>
> if ((conn->flags & VIR_CONNECT_RO) && (flags & VIR_DOMAIN_XML_SECURE)) {
Good spot; will fix.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
More information about the libvir-list
mailing list