From f43e47dbf6de24db20ec9b588bb6cc762093dd69 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 12 Feb 2015 17:52:20 +0100 Subject: QemuOpts: Drop qemu_opt_set(), rename qemu_opt_set_err(), fix use qemu_opt_set() is a wrapper around qemu_opt_set() that reports the error with qerror_report_err(). Most of its users assume the function can't fail. Make them use qemu_opt_set_err() with &error_abort, so that should the assumption ever break, it'll break noisily. Just two users remain, in util/qemu-config.c. Switch them to qemu_opt_set_err() as well, then rename qemu_opt_set_err() to qemu_opt_set(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- block.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'block.c') diff --git a/block.c b/block.c index f5ae5cd26c..ebbb51544d 100644 --- a/block.c +++ b/block.c @@ -5660,8 +5660,7 @@ void bdrv_img_create(const char *filename, const char *fmt, } if (base_filename) { - qemu_opt_set_err(opts, BLOCK_OPT_BACKING_FILE, base_filename, - &local_err); + qemu_opt_set(opts, BLOCK_OPT_BACKING_FILE, base_filename, &local_err); if (local_err) { error_setg(errp, "Backing file not supported for file format '%s'", fmt); @@ -5670,7 +5669,7 @@ void bdrv_img_create(const char *filename, const char *fmt, } if (base_fmt) { - qemu_opt_set_err(opts, BLOCK_OPT_BACKING_FMT, base_fmt, &local_err); + qemu_opt_set(opts, BLOCK_OPT_BACKING_FMT, base_fmt, &local_err); if (local_err) { error_setg(errp, "Backing file format not supported for file " "format '%s'", fmt); -- cgit v1.2.3