|
@@ -2775,6 +2775,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)) {
|