]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: command: Use 'actualType' when deciding whether to use disk format
authorPeter Krempa <pkrempa@redhat.com>
Tue, 25 Jun 2019 14:16:21 +0000 (16:16 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 26 Jun 2019 10:28:31 +0000 (12:28 +0200)
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>
src/qemu/qemu_command.c

index 85d1e3b7b011b44e7b7c0dd4017d2595a2cd6b5a..688dc324c60b50e5f5d72d6109415a8103e39f80 100644 (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";