render / rpms / libvirt

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