From 8be7e7e4c72c048b90e3482557954a24bba43ba7 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Tue, 20 Mar 2012 15:51:57 -0300 Subject: qemu-option: qemu_opts_create(): use error_set() This commit converts qemu_opts_create() from qerror_report() to error_set(). Currently, most calls to qemu_opts_create() can't fail, so most callers don't need any changes. The two cases where code checks for qemu_opts_create() erros are: 1. Initialization code in vl.c. All of them print their own error messages directly to stderr, no need to pass the Error object 2. The functions opts_parse(), qemu_opts_from_qdict() and qemu_chr_parse_compat() make use of the error information and they can be called from HMP or QMP. In this case, to allow for incremental conversion, we propagate the error up using qerror_report_err(), which keeps the QError semantics Signed-off-by: Luiz Capitulino Reviewed-By: Laszlo Ersek --- hw/usb/dev-storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/usb/dev-storage.c') diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index ae22fb1c97..a96c0b9e5e 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -584,7 +584,7 @@ static USBDevice *usb_msd_init(USBBus *bus, const char *filename) /* parse -usbdevice disk: syntax into drive opts */ snprintf(id, sizeof(id), "usb%d", nr++); - opts = qemu_opts_create(qemu_find_opts("drive"), id, 0); + opts = qemu_opts_create(qemu_find_opts("drive"), id, 0, NULL); p1 = strchr(filename, ':'); if (p1++) { -- cgit v1.2.1