]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/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)
committerJán Tomko <jtomko@redhat.com>
Fri, 27 Mar 2015 09:30:50 +0000 (10:30 +0100)
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>
src/qemu/qemu_driver.c

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