Re: [PATCH] virsh: fix snapshot-create with no xmlfile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]