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(a)redhat.com>
---
src/qemu/qemu_driver.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0283a906af..156f5d52ce 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14160,18 +14160,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);
--
2.16.2