99cbc7
From 41651c5fbe6712dcca09cfc875af4d16c0f9fd68 Mon Sep 17 00:00:00 2001
99cbc7
Message-Id: <41651c5fbe6712dcca09cfc875af4d16c0f9fd68@dist-git>
99cbc7
From: John Ferlan <jferlan@redhat.com>
99cbc7
Date: Wed, 3 Apr 2019 07:35:45 -0400
99cbc7
Subject: [PATCH] storage: Remove secretPath from _virStorageBackendQemuImgInfo
99cbc7
99cbc7
https://bugzilla.redhat.com/show_bug.cgi?id=1613737
99cbc7
99cbc7
There's really no need for it to be there since it's only ever
99cbc7
used inside virStorageBackendCreateQemuImgCmdFromVol
99cbc7
99cbc7
Signed-off-by: John Ferlan <jferlan@redhat.com>
99cbc7
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
99cbc7
(cherry picked from commit f6aa977fab1108e652ab8c360a651045c727d02e)
99cbc7
Message-Id: <20190403113547.29231-2-jferlan@redhat.com>
99cbc7
Reviewed-by: Erik Skultety <eskultet@redhat.com>
99cbc7
---
99cbc7
 src/storage/storage_util.c | 6 ++----
99cbc7
 1 file changed, 2 insertions(+), 4 deletions(-)
99cbc7
99cbc7
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
99cbc7
index 19e6e0544b..54e778490d 100644
99cbc7
--- a/src/storage/storage_util.c
99cbc7
+++ b/src/storage/storage_util.c
99cbc7
@@ -709,7 +709,6 @@ struct _virStorageBackendQemuImgInfo {
99cbc7
     int inputFormat;
99cbc7
 
99cbc7
     char *secretAlias;
99cbc7
-    const char *secretPath;
99cbc7
 };
99cbc7
 
99cbc7
 
99cbc7
@@ -1081,7 +1080,6 @@ virStorageBackendCreateQemuImgCmdFromVol(virStoragePoolObjPtr pool,
99cbc7
         .compat = vol->target.compat,
99cbc7
         .features = vol->target.features,
99cbc7
         .nocow = vol->target.nocow,
99cbc7
-        .secretPath = secretPath,
99cbc7
         .secretAlias = NULL,
99cbc7
     };
99cbc7
     virStorageEncryptionPtr enc = vol->target.encryption;
99cbc7
@@ -1124,14 +1122,14 @@ virStorageBackendCreateQemuImgCmdFromVol(virStoragePoolObjPtr pool,
99cbc7
         virCommandAddArgList(cmd, "-b", info.backingPath, NULL);
99cbc7
 
99cbc7
     if (enc) {
99cbc7
-        if (!info.secretPath) {
99cbc7
+        if (!secretPath) {
99cbc7
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
99cbc7
                            _("path to secret data file is required"));
99cbc7
             goto error;
99cbc7
         }
99cbc7
         if (virAsprintf(&info.secretAlias, "%s_encrypt0", vol->name) < 0)
99cbc7
             goto error;
99cbc7
-        if (storageBackendCreateQemuImgSecretObject(cmd, info.secretPath,
99cbc7
+        if (storageBackendCreateQemuImgSecretObject(cmd, secretPath,
99cbc7
                                                     info.secretAlias) < 0)
99cbc7
             goto error;
99cbc7
         encinfo = &enc->encinfo;
99cbc7
-- 
99cbc7
2.21.0
99cbc7