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-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c5fbad66234b1b1a9afc36ef2fe3a3d903886386;p=libvirt.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 --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index db4f0b479b..f07e4fb80e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16642,6 +16642,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) {