mirror of https://gitee.com/openkylin/libvirt.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 <jferlan@redhat.com> ACKed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
9fe597dd09
commit
9b753116f0
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue