From: John Ferlan Date: Tue, 19 Jun 2018 23:19:23 +0000 (-0400) Subject: storage: Clean up storageBackendCreateQemuImgOpts X-Git-Tag: v4.5.0-rc1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b753116f05fbed065f7d772de608967173a7fb8;p=thirdparty%2Flibvirt.git storage: Clean up storageBackendCreateQemuImgOpts 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 ACKed-by: Michal Privoznik --- diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index fe588df7dd..e090521d79 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -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)