Re: [PATCH 1/2] snapshot: let virsh edit disk snapshots

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

 



On 10/07/2011 08:13 AM, Daniel Veillard wrote:
On Thu, Oct 06, 2011 at 05:18:33PM -0600, Eric Blake wrote:
It was impossible for 'virsh snapshot-current dom name' to set name
as the current snapshot, if name is a disk-only snapshot.

Using strstr rather than full-blown xml parsing is safe, since the
xml is assumed to be well-formed coming from libvirtd rather than
arbitrary text coming from the user.



+    if (strstr(doc, "<state>disk-snapshot</state>"))
+        define_flags |= VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY;
+

  ahum, but okay ... maybe a small comment in the code

Sure.  I added that,


   ACK,

then pushed both patches.  Thanks for the speedy review.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
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]