aboutsummaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2010-06-10 09:21:43 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-10 09:21:43 -0500
commit60a3992e759d92b9111871b0881e65519c750b01 (patch)
treeaa55d288c1dd64a446154c8c8a66147264754a7c /net.c
parent77d4f95e111a7c82bf21908f4de170b7e0e722bb (diff)
parent50e32ea8f31035877decc10f1075aa0e619e09cb (diff)
downloadqemu-60a3992e759d92b9111871b0881e65519c750b01.zip
qemu-60a3992e759d92b9111871b0881e65519c750b01.tar.gz
qemu-60a3992e759d92b9111871b0881e65519c750b01.tar.bz2
Merge remote branch 'mst/for_anthony' into staging
Diffstat (limited to 'net.c')
-rw-r--r--net.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net.c b/net.c
index efa8b3d..4cb93ed 100644
--- a/net.c
+++ b/net.c
@@ -1106,6 +1106,7 @@ int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev)
for (i = 0; net_client_types[i].type != NULL; i++) {
if (!strcmp(net_client_types[i].type, type)) {
VLANState *vlan = NULL;
+ int ret;
if (qemu_opts_validate(opts, &net_client_types[i].desc[0]) == -1) {
return -1;
@@ -1118,14 +1119,16 @@ int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev)
vlan = qemu_find_vlan(qemu_opt_get_number(opts, "vlan", 0), 1);
}
+ ret = -1;
if (net_client_types[i].init) {
- if (net_client_types[i].init(opts, mon, name, vlan) < 0) {
+ ret = net_client_types[i].init(opts, mon, name, vlan);
+ if (ret < 0) {
/* TODO push error reporting into init() methods */
qerror_report(QERR_DEVICE_INIT_FAILED, type);
return -1;
}
}
- return 0;
+ return ret;
}
}