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   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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

Reply via email to