]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuDomainBlockPeek: Fix format checking logic
authorPeter Krempa <pkrempa@redhat.com>
Sat, 16 Dec 2023 08:20:41 +0000 (09:20 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Sat, 16 Dec 2023 08:20:41 +0000 (09:20 +0100)
Recent refactor which changed the format check to use
qemuBlockStorageSourceIsRaw accidentaly inverted the condition.

Caught by the CI test suite.

Fixes: b600b69f8291226095e0fdb2eb7503baa79063fc
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_driver.c

index 9d8be1572179d01bedbae7d79da079ef2da682bb..2d7535793920cc489d35a3ebd2a0472859d9d999 100644 (file)
@@ -10173,7 +10173,7 @@ qemuDomainBlockPeek(virDomainPtr dom,
         goto cleanup;
     }
 
-    if (qemuBlockStorageSourceIsRaw(disk->src)) {
+    if (!qemuBlockStorageSourceIsRaw(disk->src)) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
                        _("peeking is only supported for disk with 'raw' format not '%1$s'"),
                        virStorageFileFormatTypeToString(disk->src->format));