]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: end the job when try to blockcopy to non-file destination
authorShanzhi Yu <shyu@redhat.com>
Fri, 27 Mar 2015 09:16:41 +0000 (17:16 +0800)
committerCole Robinson <crobinso@redhat.com>
Tue, 28 Apr 2015 15:06:44 +0000 (11:06 -0400)
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 <shyu@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit c5fbad66234b1b1a9afc36ef2fe3a3d903886386)

src/qemu/qemu_driver.c

index ab681cc9d5517c59f82356cdca6e8eca85ff552f..f7228050f0d241195375e9c6b40bd4c9d1a62789 100644 (file)
@@ -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) {