[libvirt] [PATCH] virsh: fix snapshot-create with no xmlfile
Eric Blake
eblake at redhat.com
Mon Mar 11 15:50:30 UTC 2013
On 03/11/2013 06:48 AM, Peter Krempa wrote:
> On 03/11/13 13:40, Ján Tomko wrote:
>> Properly check the return value of vshCommandOptStringReq for xmlfile:
>> * error out on incorrect input (--xmlfile '')
>> * use default XML <domainsnapshot/> with no --xmlfile specified
>>
>> (Broken by commit b2e8585)
>>
>> Bug: https://bugzilla.redhat.com/show_bug.cgi?id=919826
>> + if (!from) {
>> buffer = vshStrdup(ctl, "<domainsnapshot/>");
>
> This fallback code is really weird. We should have rejected missing XML
> name by default and encourage to use "snapshot-create-as".
Except that 'snapshot-create' was invented several releases prior to
'snapshot-create-as', back when snapshots were simple enough that
creating without an xml file was common enough to do without needing a
second command.
We have to keep the older behavior for clients written prior to when
snapshot-create-as was introduced.
--
Eric Blake eblake 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: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130311/6ef24606/attachment-0001.sig>
More information about the libvir-list
mailing list