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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux