qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block/qcow: Improve error when opening qcow2 files as qcow
@ 2019-06-26 21:53 John Snow
  2019-06-26 23:25 ` Eric Blake
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: John Snow @ 2019-06-26 21:53 UTC (permalink / raw)
  To: qemu-block, qemu-devel
  Cc: Qemu-Trivial, Kevin Wolf, radmehrsaeed7, John Snow, Max Reitz

Reported-by: radmehrsaeed7@gmail.com
Fixes: https://bugs.launchpad.net/bugs/1832914
Signed-off-by: John Snow <jsnow@redhat.com>
---
 block/qcow.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/block/qcow.c b/block/qcow.c
index 6dee5bb792..a9cb6ae0bd 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -156,7 +156,12 @@ static int qcow_open(BlockDriverState *bs, QDict *options, int flags,
         goto fail;
     }
     if (header.version != QCOW_VERSION) {
-        error_setg(errp, "Unsupported qcow version %" PRIu32, header.version);
+        error_setg(errp, "qcow (v%d) does not support qcow version %" PRIu32,
+                   QCOW_VERSION, header.version);
+        if (header.version == 2 || header.version == 3) {
+            error_append_hint(errp, "Try the 'qcow2' driver instead.");
+        }
+
         ret = -ENOTSUP;
         goto fail;
     }
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-06-28 17:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-26 21:53 [Qemu-devel] [PATCH] block/qcow: Improve error when opening qcow2 files as qcow John Snow
2019-06-26 23:25 ` Eric Blake
2019-06-27  8:34 ` Kevin Wolf
2019-06-27 14:51   ` Eric Blake
2019-06-27 17:17   ` John Snow
2019-06-28  9:24     ` Kevin Wolf
2019-06-28 16:50       ` John Snow
2019-06-27  8:35 ` [Qemu-devel] [Qemu-block] " Maxim Levitsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).