From 76e3de37bf9bff3eabb1fadd9dddcd723719eac1 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 25 Jun 2019 16:16:21 +0200 Subject: [PATCH] qemu: command: Use 'actualType' when deciding whether to use disk format MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 85d1e3b7b0..688dc324c6 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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"; -- 2.39.5