qemu: command: Use 'actualType' when deciding whether to use disk format

qemuBuildDriveSourceStr omits the disk format string when we are
emulating a 'fat' filesystem from a directory. The logic should decide
based on the 'actualType' as a disk type=pool may be converted to a
directory.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2019-06-25 16:16:21 +02:00
parent 6dd609114d
commit 76e3de37bf

View File

@ -1730,7 +1730,7 @@ qemuBuildDriveSourceStr(virDomainDiskDefPtr disk,
}
if (disk->src->format > 0 &&
disk->src->type != VIR_STORAGE_TYPE_DIR) {
actualType != VIR_STORAGE_TYPE_DIR) {
const char *qemuformat = virStorageFileFormatTypeToString(disk->src->format);
if (rawluks)
qemuformat = "luks";