mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
384f2139ff
commit
4e89978e20
4 changed files with 35 additions and 11 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue