aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'block.c')
-rw-r--r--block.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/block.c b/block.c
index ebbb51544d..28ea19aafb 100644
--- a/block.c
+++ b/block.c
@@ -5653,7 +5653,10 @@ void bdrv_img_create(const char *filename, const char *fmt,
/* Parse -o options */
if (options) {
- if (qemu_opts_do_parse(opts, options, NULL) != 0) {
+ qemu_opts_do_parse(opts, options, NULL, &local_err);
+ if (local_err) {
+ error_report_err(local_err);
+ local_err = NULL;
error_setg(errp, "Invalid options for file format '%s'", fmt);
goto out;
}