[libvirt] [PATCH] snapshot: don't pass NULL to QMP command creation

Eric Blake eblake at redhat.com
Tue Mar 27 15:43:34 UTC 2012


On 03/27/2012 09:33 AM, Peter Krempa wrote:
> Dňa 27.3.2012 16:37, Eric Blake  wrote / napísal(a):
>> Commit d42a2ff caused a regression in creating a disk-only snapshot
>> of a qcow2 disk; by passing the wrong variable to the monitor call,
>> libvirt ended up creating JSON that looked like "format":null instead
>> of the intended "format":"qcow2".
>>
>> To make it easier to diagnose this in the future, make JSON creation
>> error out if "s:arg" is paired with NULL (it is still possible to
>> use "n:arg" in the rare cases where qemu will accept a null).
>>
>> * src/qemu/qemu_driver.c
>> (qemuDomainSnapshotCreateSingleDiskActive): Pass correct value.
>> * src/qemu/qemu_monitor_json.c (qemuMonitorJSONMakeCommandRaw):
>> Improve error message.
>> ---
>>   src/qemu/qemu_driver.c       |    2 +-
>>   src/qemu/qemu_monitor_json.c |    6 ++++++
>>   2 files changed, 7 insertions(+), 1 deletions(-)
> 
> Definitely a better solution. ACK

Thanks; pushed.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120327/83d10b54/attachment-0001.sig>


More information about the libvir-list mailing list