|
|
d76c62 |
From c44dbb2ca444be1d655d41bcd8df8eec89784f81 Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <c44dbb2ca444be1d655d41bcd8df8eec89784f81@dist-git>
|
|
|
d76c62 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Date: Wed, 19 Feb 2020 15:09:58 +0100
|
|
|
d76c62 |
Subject: [PATCH] virDomainDiskTranslateSourcePoolAuth: Take
|
|
|
d76c62 |
virStorageSourcePtr instead of virDomainDiskDefPtr
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
Only 'def->src' was ever used in this function. Use the source directly.
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit 4fca8299c5d83378fc950f23bdf9fcca605a8251)
|
|
|
d76c62 |
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1804603
|
|
|
d76c62 |
Message-Id: <66d9f9fe057c447d3b1fc5e93fce513b33242c05.1582120424.git.pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
src/conf/domain_conf.c | 10 +++++-----
|
|
|
d76c62 |
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
|
|
d76c62 |
index 9cbc7b47e7..14b675d5d6 100644
|
|
|
d76c62 |
--- a/src/conf/domain_conf.c
|
|
|
d76c62 |
+++ b/src/conf/domain_conf.c
|
|
|
d76c62 |
@@ -31222,18 +31222,18 @@ virDomainDiskAddISCSIPoolSourceHost(virStorageSourcePtr src,
|
|
|
d76c62 |
|
|
|
d76c62 |
|
|
|
d76c62 |
static int
|
|
|
d76c62 |
-virDomainDiskTranslateSourcePoolAuth(virDomainDiskDefPtr def,
|
|
|
d76c62 |
+virDomainDiskTranslateSourcePoolAuth(virStorageSourcePtr src,
|
|
|
d76c62 |
virStoragePoolSourcePtr source)
|
|
|
d76c62 |
{
|
|
|
d76c62 |
/* Only necessary when authentication set */
|
|
|
d76c62 |
if (!source->auth)
|
|
|
d76c62 |
return 0;
|
|
|
d76c62 |
|
|
|
d76c62 |
- def->src->auth = virStorageAuthDefCopy(source->auth);
|
|
|
d76c62 |
- if (!def->src->auth)
|
|
|
d76c62 |
+ src->auth = virStorageAuthDefCopy(source->auth);
|
|
|
d76c62 |
+ if (!src->auth)
|
|
|
d76c62 |
return -1;
|
|
|
d76c62 |
/* A <disk> doesn't use
|
|
|
d76c62 |
- def->src->auth->authType = VIR_STORAGE_AUTH_TYPE_NONE;
|
|
|
d76c62 |
+ src->auth->authType = VIR_STORAGE_AUTH_TYPE_NONE;
|
|
|
d76c62 |
return 0;
|
|
|
d76c62 |
}
|
|
|
d76c62 |
|
|
|
d76c62 |
@@ -31245,7 +31245,7 @@ virDomainDiskTranslateISCSIDirect(virDomainDiskDefPtr def,
|
|
|
d76c62 |
def->src->srcpool->actualtype = VIR_STORAGE_TYPE_NETWORK;
|
|
|
d76c62 |
def->src->protocol = VIR_STORAGE_NET_PROTOCOL_ISCSI;
|
|
|
d76c62 |
|
|
|
d76c62 |
- if (virDomainDiskTranslateSourcePoolAuth(def,
|
|
|
d76c62 |
+ if (virDomainDiskTranslateSourcePoolAuth(def->src,
|
|
|
d76c62 |
&pooldef->source) < 0)
|
|
|
d76c62 |
return -1;
|
|
|
d76c62 |
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.0
|
|
|
d76c62 |
|