aboutsummaryrefslogtreecommitdiff
path: root/net/tap-win32.c
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2012-07-17 16:17:19 +0200
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-07-23 11:55:18 +0100
commit08c573a8d14893518df412c68541aae5b7091982 (patch)
treeeaf5cf5a59f740f9929781c7bf2a2dcf79aaf06f /net/tap-win32.c
parent4a917c39aed9ad7f648c435204a6586c4ca3f2f2 (diff)
convert net_init_tap() to NetClientOptions
Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'net/tap-win32.c')
-rw-r--r--net/tap-win32.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/tap-win32.c b/net/tap-win32.c
index b738f45bd6..b6099cd847 100644
--- a/net/tap-win32.c
+++ b/net/tap-win32.c
@@ -699,19 +699,20 @@ static int tap_win32_init(VLANState *vlan, const char *model,
return 0;
}
-int net_init_tap(QemuOpts *opts, const NetClientOptions *new_opts,
+int net_init_tap(QemuOpts *old_opts, const NetClientOptions *opts,
const char *name, VLANState *vlan)
{
- const char *ifname;
+ const NetdevTapOptions *tap;
- ifname = qemu_opt_get(opts, "ifname");
+ assert(opts->kind == NET_CLIENT_OPTIONS_KIND_TAP);
+ tap = opts->tap;
- if (!ifname) {
+ if (!tap->has_ifname) {
error_report("tap: no interface name");
return -1;
}
- if (tap_win32_init(vlan, "tap", name, ifname) == -1) {
+ if (tap_win32_init(vlan, "tap", name, tap->ifname) == -1) {
return -1;
}