From c5fbad66234b1b1a9afc36ef2fe3a3d903886386 Mon Sep 17 00:00:00 2001 From: Shanzhi Yu Date: Fri, 27 Mar 2015 17:16:41 +0800 Subject: [PATCH] qemu: end the job when try to blockcopy to non-file destination MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/qemu/qemu_driver.c | 1 + 1 file changed, 1 insertion(+) 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) {