mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
convert net_init_tap() to NetClientOptions
Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
committed by
Stefan Hajnoczi
parent
4a917c39ae
commit
08c573a8d1
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user