|
|
a41c76 |
From eaf5a1634e29eb3c4c3267b7724038049dacadc7 Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <eaf5a1634e29eb3c4c3267b7724038049dacadc7@dist-git>
|
|
|
a41c76 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Date: Wed, 19 Feb 2020 15:09:55 +0100
|
|
|
a41c76 |
Subject: [PATCH] virDomainDiskAddISCSIPoolSourceHost: Remove 'cleanup' label
|
|
|
a41c76 |
MIME-Version: 1.0
|
|
|
a41c76 |
Content-Type: text/plain; charset=UTF-8
|
|
|
a41c76 |
Content-Transfer-Encoding: 8bit
|
|
|
a41c76 |
|
|
|
a41c76 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
(cherry picked from commit 4d5093ef75efdf87a941ffd3fbc1d974e031a0a3)
|
|
|
a41c76 |
|
|
|
a41c76 |
https://bugzilla.redhat.com/show_bug.cgi?id=1804603
|
|
|
a41c76 |
Message-Id: <da07ec7957e5c8f502c43bf0542a0d42ae1f62ee.1582120424.git.pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
---
|
|
|
a41c76 |
src/conf/domain_conf.c | 12 ++++--------
|
|
|
a41c76 |
1 file changed, 4 insertions(+), 8 deletions(-)
|
|
|
a41c76 |
|
|
|
a41c76 |
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
|
|
a41c76 |
index f0365329c6..436d094578 100644
|
|
|
a41c76 |
--- a/src/conf/domain_conf.c
|
|
|
a41c76 |
+++ b/src/conf/domain_conf.c
|
|
|
a41c76 |
@@ -31173,7 +31173,6 @@ static int
|
|
|
a41c76 |
virDomainDiskAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
|
|
|
a41c76 |
virStoragePoolDefPtr pooldef)
|
|
|
a41c76 |
{
|
|
|
a41c76 |
- int ret = -1;
|
|
|
a41c76 |
VIR_AUTOSTRINGLIST tokens = NULL;
|
|
|
a41c76 |
size_t ntokens;
|
|
|
a41c76 |
|
|
|
a41c76 |
@@ -31181,7 +31180,7 @@ virDomainDiskAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
|
|
|
a41c76 |
if (pooldef->source.nhost != 1) {
|
|
|
a41c76 |
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
|
a41c76 |
_("Expected exactly 1 host for the storage pool"));
|
|
|
a41c76 |
- goto cleanup;
|
|
|
a41c76 |
+ return -1;
|
|
|
a41c76 |
}
|
|
|
a41c76 |
|
|
|
a41c76 |
/* iscsi pool only supports one host */
|
|
|
a41c76 |
@@ -31195,13 +31194,13 @@ virDomainDiskAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
|
|
|
a41c76 |
|
|
|
a41c76 |
/* iscsi volume has name like "unit:0:0:1" */
|
|
|
a41c76 |
if (!(tokens = virStringSplitCount(def->src->srcpool->volume, ":", 0, &ntokens)))
|
|
|
a41c76 |
- goto cleanup;
|
|
|
a41c76 |
+ return -1;
|
|
|
a41c76 |
|
|
|
a41c76 |
if (ntokens != 4) {
|
|
|
a41c76 |
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
|
a41c76 |
_("unexpected iscsi volume name '%s'"),
|
|
|
a41c76 |
def->src->srcpool->volume);
|
|
|
a41c76 |
- goto cleanup;
|
|
|
a41c76 |
+ return -1;
|
|
|
a41c76 |
}
|
|
|
a41c76 |
|
|
|
a41c76 |
/* iscsi pool has only one source device path */
|
|
|
a41c76 |
@@ -31216,10 +31215,7 @@ virDomainDiskAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
|
|
|
a41c76 |
|
|
|
a41c76 |
def->src->protocol = VIR_STORAGE_NET_PROTOCOL_ISCSI;
|
|
|
a41c76 |
|
|
|
a41c76 |
- ret = 0;
|
|
|
a41c76 |
-
|
|
|
a41c76 |
- cleanup:
|
|
|
a41c76 |
- return ret;
|
|
|
a41c76 |
+ return 0;
|
|
|
a41c76 |
}
|
|
|
a41c76 |
|
|
|
a41c76 |
|
|
|
a41c76 |
--
|
|
|
a41c76 |
2.25.0
|
|
|
a41c76 |
|