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 --- hw/usb/dev-storage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/usb/dev-storage.c') diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index af2e1b915d..65d9aa6147 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -683,7 +683,7 @@ static USBDevice *usb_msd_init(USBBus *bus, const char *filename) if (strstart(filename, "format=", &p2)) { int len = MIN(p1 - p2, sizeof(fmt)); pstrcpy(fmt, len, p2); - qemu_opt_set(opts, "format", fmt); + qemu_opt_set(opts, "format", fmt, &error_abort); } else if (*filename != ':') { error_report("unrecognized USB mass-storage option %s", filename); return NULL; @@ -694,8 +694,8 @@ static USBDevice *usb_msd_init(USBBus *bus, const char *filename) error_report("block device specification needed"); return NULL; } - qemu_opt_set(opts, "file", filename); - qemu_opt_set(opts, "if", "none"); + qemu_opt_set(opts, "file", filename, &error_abort); + qemu_opt_set(opts, "if", "none", &error_abort); /* create host drive */ dinfo = drive_new(opts, 0); -- cgit v1.2.3