aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-05-08 12:34:18 +0200
committerMark McLoughlin <markmc@redhat.com>2009-06-09 11:38:49 +0100
commit10ae5a7a98f7c1d901fbb6658324e9c4c4fec8cf (patch)
tree7bc3ce8db3cd1efcf8de25c5cc150a5095cc3d46 /vl.c
parentc8decae2e135d2331268619aa07701c31595b6c9 (diff)
downloadqemu-10ae5a7a98f7c1d901fbb6658324e9c4c4fec8cf.zip
qemu-10ae5a7a98f7c1d901fbb6658324e9c4c4fec8cf.tar.gz
qemu-10ae5a7a98f7c1d901fbb6658324e9c4c4fec8cf.tar.bz2
net: Improve parameter error reporting
As host network devices can also be instantiated via the monitor, errors should then be reported to the related monitor instead of stderr. This requires larger refactoring, so this patch starts small with introducing a helper to catch both cases and convert net_client_init as well as net_slirp_redir. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 659e9f7..94027c0 100644
--- a/vl.c
+++ b/vl.c
@@ -2699,7 +2699,7 @@ static int usb_device_add(const char *devname, int is_hotplug)
} else if (strstart(devname, "net:", &p)) {
int nic = nb_nics;
- if (net_client_init("nic", p) < 0)
+ if (net_client_init(NULL, "nic", p) < 0)
return -1;
nd_table[nic].model = "usb";
dev = usb_net_init(&nd_table[nic]);