]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage: Clean up storageBackendCreateQemuImgOpts
authorJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jun 2018 23:19:23 +0000 (19:19 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 26 Jun 2018 18:02:43 +0000 (14:02 -0400)
Since we only generate the @encinfo when there's a secret object
and thus we need to reference it in the options,

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
src/storage/storage_util.c

index fe588df7dd26eaae0dfbdaa570c4d7528449951b..e090521d79375e8e729dbaf241f3bb5e2879e226 100644 (file)
@@ -827,12 +827,8 @@ storageBackendCreateQemuImgOpts(virStorageEncryptionInfoDefPtr encinfo,
         virBufferAsprintf(&buf, "backing_fmt=%s,",
                           virStorageFileFormatTypeToString(info.backingFormat));
 
-    if (info.format == VIR_STORAGE_FILE_RAW && encinfo) {
+    if (encinfo)
         virQEMUBuildQemuImgKeySecretOpts(&buf, encinfo, info.secretAlias);
-    } else {
-        if (info.encryption)
-            virBufferAddLit(&buf, "encryption=on,");
-    }
 
     if (info.preallocate) {
         if (info.size_arg > info.allocation)