aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-hotplug.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-04-20 16:50:25 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2012-06-04 13:49:35 -0300
commit4559a1dbcc15a10482de822e2839645a1819ef6f (patch)
tree9890da3db00eaf564e72d51526aa586a266f9143 /hw/pci-hotplug.c
parent42dcc547e1982f31d0f678e02f0aae5be570384a (diff)
net: net_client_init(): use error_set()
Callers are changed to use qerror_report_err() to keep their QError semantics. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'hw/pci-hotplug.c')
-rw-r--r--hw/pci-hotplug.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 785eb3d889..61257f457b 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -39,6 +39,7 @@ static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
const char *devaddr,
const char *opts_str)
{
+ Error *local_err = NULL;
QemuOpts *opts;
PCIBus *bus;
int ret, devfn;
@@ -60,9 +61,12 @@ static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
qemu_opt_set(opts, "type", "nic");
- ret = net_client_init(opts, 0);
- if (ret < 0)
+ ret = net_client_init(opts, 0, &local_err);
+ if (error_is_set(&local_err)) {
+ qerror_report_err(local_err);
+ error_free(local_err);
return NULL;
+ }
if (nd_table[ret].devaddr) {
monitor_printf(mon, "Parameter addr not supported\n");
return NULL;