From 08c573a8d14893518df412c68541aae5b7091982 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Tue, 17 Jul 2012 16:17:19 +0200 Subject: convert net_init_tap() to NetClientOptions Signed-off-by: Laszlo Ersek Signed-off-by: Stefan Hajnoczi --- net/tap-win32.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'net/tap-win32.c') diff --git a/net/tap-win32.c b/net/tap-win32.c index b738f45..b6099cd 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; } -- cgit v1.1