mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07: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
5
net.c
5
net.c
|
|
@ -1237,11 +1237,14 @@ void net_host_device_remove(Monitor *mon, const QDict *qdict)
|
|||
|
||||
int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data)
|
||||
{
|
||||
Error *local_err = NULL;
|
||||
QemuOpts *opts;
|
||||
int res;
|
||||
|
||||
opts = qemu_opts_from_qdict(qemu_find_opts("netdev"), qdict);
|
||||
opts = qemu_opts_from_qdict(qemu_find_opts("netdev"), qdict, &local_err);
|
||||
if (!opts) {
|
||||
qerror_report_err(local_err);
|
||||
error_free(local_err);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue