diff options
author | Kővágó, Zoltán <dirty.ice.hu@gmail.com> | 2016-07-13 21:50:12 -0600 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-07-19 13:21:08 +0200 |
commit | cebea510579ed43724156cc596a8ff14ba208740 (patch) | |
tree | 36a425d96c2debd011a6d7df8867e2290b338d48 /net/slirp.c | |
parent | 3d344c2aabb7bc9b414321e3c52872901edebdda (diff) |
net: use Netdev instead of NetClientOptions in client init
This way we no longer need NetClientOptions and can convert Netdev
into a flat union.
Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <93ffdfed7054529635e6acb935150d95dc173a12.1441627176.git.DirtY.iCE.hu@gmail.com>
[rework net_client_init1() to pass Netdev by copying from NetdevLegacy,
rather than merging the two types - which means that we still need
NetClientOptions after all. Rebase to qapi changes. The bulk of the
patch is mechanical, replacing 'opts' by 'netdev->opts', while
net_client_init1() takes care of converting between legacy and modern
types.]
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1468468228-27827-2-git-send-email-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'net/slirp.c')
-rw-r--r-- | net/slirp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/slirp.c b/net/slirp.c index 28207b6614..ca34badb76 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -828,7 +828,7 @@ static const char **slirp_dnssearch(const StringList *dnsname) return ret; } -int net_init_slirp(const NetClientOptions *opts, const char *name, +int net_init_slirp(const Netdev *netdev, const char *name, NetClientState *peer, Error **errp) { /* FIXME error_setg(errp, ...) on failure */ @@ -839,8 +839,8 @@ int net_init_slirp(const NetClientOptions *opts, const char *name, const char **dnssearch; bool ipv4 = true, ipv6 = true; - assert(opts->type == NET_CLIENT_OPTIONS_KIND_USER); - user = opts->u.user.data; + assert(netdev->opts->type == NET_CLIENT_OPTIONS_KIND_USER); + user = netdev->opts->u.user.data; if ((user->has_ipv6 && user->ipv6 && !user->has_ipv4) || (user->has_ipv4 && !user->ipv4)) { |