[RFC PATCH 3/7] qemuMigrationSrcNBDStorageCopy: Return error code on error

Peter Krempa posted 7 patches 4 years, 10 months ago
[RFC PATCH 3/7] qemuMigrationSrcNBDStorageCopy: Return error code on error
Posted by Peter Krempa 4 years, 10 months ago
In case the 'nbdURI' schema is not known the code would report an error
but wouldn't return failure.

Fixes: 49186372dbe
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_migration.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index df88f954ed..1c3e599128 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1154,6 +1154,7 @@ qemuMigrationSrcNBDStorageCopy(virQEMUDriver *driver,
             virReportError(VIR_ERR_INVALID_ARG,
                            _("Unsupported scheme in disks URI: %s"),
                            uri->scheme);
+            return -1;
         }
     }

-- 
2.30.2

Re: [RFC PATCH 3/7] qemuMigrationSrcNBDStorageCopy: Return error code on error
Posted by Andrea Bolognani 4 years, 9 months ago
On Tue, 2021-04-13 at 17:38 +0200, Peter Krempa wrote:
> In case the 'nbdURI' schema is not known the code would report an error
> but wouldn't return failure.
> 
> Fixes: 49186372dbe

You can use the full commit ID here.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization