]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: driver: Remove impossible code path in qemuDomainSnapshotCreateInactiveExternal
authorPeter Krempa <pkrempa@redhat.com>
Mon, 4 Jun 2018 07:00:37 +0000 (09:00 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 8 Jun 2018 07:26:37 +0000 (09:26 +0200)
Previous patch naively removed all code relevant to disk format
checking. The semantics now dictate that the format check when creating
external snapshots is now impossible as we always fill in the format for
disks in domain definition in the post-parse callback.

Remove the impossible code path.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c

index 2f28674ef5548fb6b4499eed511d893bb1bd02c7..971cf3c2750a297eaf376cac2114bcb03d4561e2 100644 (file)
@@ -14187,18 +14187,10 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver,
                                          NULL)))
             goto cleanup;
 
-        if (defdisk->src->format > 0) {
-            /* adds cmd line arg: backing_file=/path/to/backing/file,backing_fmd=format */
-            virCommandAddArgFormat(cmd, "backing_file=%s,backing_fmt=%s",
-                                   defdisk->src->path,
-                                   virStorageFileFormatTypeToString(defdisk->src->format));
-        } else {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                           _("unknown image format of '%s' and "
-                             "format probing is disabled"),
-                           defdisk->src->path);
-            goto cleanup;
-        }
+        /* adds cmd line arg: backing_file=/path/to/backing/file,backing_fmd=format */
+        virCommandAddArgFormat(cmd, "backing_file=%s,backing_fmt=%s",
+                               defdisk->src->path,
+                               virStorageFileFormatTypeToString(defdisk->src->format));
 
         /* adds cmd line args: /path/to/target/file */
         virCommandAddArg(cmd, snapdisk->src->path);