summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--qemu-img.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 8c4edf37a9..7876258fa9 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2986,6 +2986,13 @@ static int img_amend(int argc, char **argv)
         goto out;
     }
 
+    if (!bs->drv->create_opts) {
+        error_report("Format driver '%s' does not support any options to amend",
+                     fmt);
+        ret = -1;
+        goto out;
+    }
+
     create_opts = qemu_opts_append(create_opts, bs->drv->create_opts);
     opts = qemu_opts_create(create_opts, NULL, 0, &error_abort);
     if (options && qemu_opts_do_parse(opts, options, NULL)) {