[libvirt] [PATCH] qemu: clarify message about block peek format restriction

Daniel P. Berrangé berrange at redhat.com
Mon May 21 09:31:46 UTC 2018


Include the actual disk format in the error message to help the user see
what is wrong.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 src/qemu/qemu_driver.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index e61af23870..3a328e5d46 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11544,8 +11544,9 @@ qemuDomainBlockPeek(virDomainPtr dom,
     }
 
     if (disk->src->format != VIR_STORAGE_FILE_RAW) {
-        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                       _("peeking is supported only for RAW disks"));
+        virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
+                       _("peeking is only supported for disk with 'raw' format not '%s'"),
+                       virStorageFileFormatTypeToString(disk->src->format));
         goto cleanup;
     }
 
-- 
2.17.0




More information about the libvir-list mailing list