]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: block: Create helper for creating data for legacy snapshots
authorPeter Krempa <pkrempa@redhat.com>
Tue, 3 Jul 2018 12:13:29 +0000 (14:13 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 20 Jul 2018 11:39:44 +0000 (13:39 +0200)
commitbed681d7b53dace3793087ddca5b4b21233195f9
tree55e12235713f3d5c41589ec0951b508327032a05
parentfaf769d862df220cff801a618abbb93796b9453b
qemu: block: Create helper for creating data for legacy snapshots

With 'transaction' support we don't need to keep around the multipurpose
code which would create the snapshot if 'transaction' is not supported.

To simplify this add a new helper that just wraps the arguments for
'blockdev-snapshot-sync' operation in 'transaction' and use it instead
of qemuBlockSnapshotAddLegacy.

Additionally this allows to format the arguments prior to creating the
file for simpler cleanup.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_block.h
src/qemu/qemu_driver.c