9c6c51
From 6146c60df8ac981e06828ca13d1f935af866028a Mon Sep 17 00:00:00 2001
9c6c51
Message-Id: <6146c60df8ac981e06828ca13d1f935af866028a@dist-git>
9c6c51
From: John Ferlan <jferlan@redhat.com>
9c6c51
Date: Fri, 2 Nov 2018 16:57:10 +0100
9c6c51
Subject: [PATCH] storage: Remove secretPath from _virStorageBackendQemuImgInfo
9c6c51
9c6c51
There's really no need for it to be there since it's only ever
9c6c51
used inside virStorageBackendCreateQemuImgCmdFromVol
9c6c51
9c6c51
Signed-off-by: John Ferlan <jferlan@redhat.com>
9c6c51
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
9c6c51
(cherry picked from commit f6aa977fab1108e652ab8c360a651045c727d02e)
9c6c51
9c6c51
https://bugzilla.redhat.com/show_bug.cgi?id=1645459
9c6c51
9c6c51
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
9c6c51
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
9c6c51
---
9c6c51
 src/storage/storage_util.c | 6 ++----
9c6c51
 1 file changed, 2 insertions(+), 4 deletions(-)
9c6c51
9c6c51
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
9c6c51
index 5dc22d3182..19e58714ca 100644
9c6c51
--- a/src/storage/storage_util.c
9c6c51
+++ b/src/storage/storage_util.c
9c6c51
@@ -709,7 +709,6 @@ struct _virStorageBackendQemuImgInfo {
9c6c51
     int inputFormat;
9c6c51
 
9c6c51
     char *secretAlias;
9c6c51
-    const char *secretPath;
9c6c51
 };
9c6c51
 
9c6c51
 
9c6c51
@@ -1081,7 +1080,6 @@ virStorageBackendCreateQemuImgCmdFromVol(virStoragePoolObjPtr pool,
9c6c51
         .compat = vol->target.compat,
9c6c51
         .features = vol->target.features,
9c6c51
         .nocow = vol->target.nocow,
9c6c51
-        .secretPath = secretPath,
9c6c51
         .secretAlias = NULL,
9c6c51
     };
9c6c51
     virStorageEncryptionPtr enc = vol->target.encryption;
9c6c51
@@ -1124,14 +1122,14 @@ virStorageBackendCreateQemuImgCmdFromVol(virStoragePoolObjPtr pool,
9c6c51
         virCommandAddArgList(cmd, "-b", info.backingPath, NULL);
9c6c51
 
9c6c51
     if (enc) {
9c6c51
-        if (!info.secretPath) {
9c6c51
+        if (!secretPath) {
9c6c51
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
9c6c51
                            _("path to secret data file is required"));
9c6c51
             goto error;
9c6c51
         }
9c6c51
         if (virAsprintf(&info.secretAlias, "%s_encrypt0", vol->name) < 0)
9c6c51
             goto error;
9c6c51
-        if (storageBackendCreateQemuImgSecretObject(cmd, info.secretPath,
9c6c51
+        if (storageBackendCreateQemuImgSecretObject(cmd, secretPath,
9c6c51
                                                     info.secretAlias) < 0)
9c6c51
             goto error;
9c6c51
         encinfo = &enc->encinfo;
9c6c51
-- 
9c6c51
2.19.1
9c6c51