]> git.ipfire.org Git - thirdparty/qemu.git/commit
qemu-img: Check create_opts before image creation
authorMax Reitz <mreitz@redhat.com>
Tue, 2 Dec 2014 17:32:46 +0000 (18:32 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Sun, 22 Feb 2015 18:03:51 +0000 (12:03 -0600)
commit10be14ee7d1d82e439f0fab69e32c90427afa07c
tree8d5c6d4dca1b7a850a49ee89ec1dce38381a1cf1
parent6065d5484a092d55b274876d1fafb8223041842a
qemu-img: Check create_opts before image creation

If a driver supports image creation, it needs to set the .create_opts
field. We can use that to make sure .create_opts for both drivers
involved is not NULL for the target image in qemu-img convert, which is
important so that the create_opts pointer in img_convert() is not NULL
after the qemu_opts_append() calls and when going into
qemu_opts_create().

Cc: qemu-stable@nongnu.org
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit f75613cf2488a37fb8019bc32a06ddbcd477d0ce)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qemu-img.c