From: Shanzhi Yu Date: Fri, 27 Mar 2015 09:16:41 +0000 (+0800) Subject: qemu: end the job when try to blockcopy to non-file destination X-Git-Tag: v1.2.13.1~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52ef86afbeadf1f51675e44bbdce6486a4b12b9a;p=thirdparty%2Flibvirt.git qemu: end the job when try to blockcopy to non-file destination Blockcopy to non-file destination is not supported according the code, but a 'goto endjob' is missed after checking the destination. This leads to calling drive-mirror with wrong parameters. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1206406 Signed-off-by: Shanzhi Yu Signed-off-by: Ján Tomko (cherry picked from commit c5fbad66234b1b1a9afc36ef2fe3a3d903886386) --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ab681cc9d5..f7228050f0 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16166,6 +16166,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm, if (!virStorageSourceIsLocalStorage(mirror)) { virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", _("non-file destination not supported yet")); + goto endjob; } if (stat(mirror->path, &st) < 0) { if (errno != ENOENT) {