render / rpms / libvirt

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