aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev-monitor.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-04-18 17:24:01 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2012-06-04 13:49:34 -0300
commit4e89978e2021c0431aad9898823eb9d3526e9018 (patch)
tree2bc9c129629d5b88c1e911589223cd13fe860e2f /hw/qdev-monitor.c
parent384f2139ff681cd3c26de365417cff46c186b5f0 (diff)
qemu-option: qemu_opts_from_qdict(): use error_set()
do_device_add() and do_netdev_add() call qerror_report_err() to maintain their QError semantics. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'hw/qdev-monitor.c')
-rw-r--r--hw/qdev-monitor.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
index eed781d2f0..b01ef0600e 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -554,10 +554,13 @@ void do_info_qdm(Monitor *mon)
int do_device_add(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
+ Error *local_err = NULL;
QemuOpts *opts;
- opts = qemu_opts_from_qdict(qemu_find_opts("device"), qdict);
- if (!opts) {
+ opts = qemu_opts_from_qdict(qemu_find_opts("device"), qdict, &local_err);
+ if (error_is_set(&local_err)) {
+ qerror_report_err(local_err);
+ error_free(local_err);
return -1;
}
if (!monitor_cur_is_qmp() && qdev_device_help(opts)) {