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