From cebea510579ed43724156cc596a8ff14ba208740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= Date: Wed, 13 Jul 2016 21:50:12 -0600 Subject: net: use Netdev instead of NetClientOptions in client init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way we no longer need NetClientOptions and can convert Netdev into a flat union. Signed-off-by: Kővágó, Zoltán Reviewed-by: Eric Blake 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 Message-Id: <1468468228-27827-2-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- net/netmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/netmap.c') diff --git a/net/netmap.c b/net/netmap.c index 64967b947e..beb8d2841c 100644 --- a/net/netmap.c +++ b/net/netmap.c @@ -418,10 +418,10 @@ static NetClientInfo net_netmap_info = { * * ... -net netmap,ifname="..." */ -int net_init_netmap(const NetClientOptions *opts, +int net_init_netmap(const Netdev *netdev, const char *name, NetClientState *peer, Error **errp) { - const NetdevNetmapOptions *netmap_opts = opts->u.netmap.data; + const NetdevNetmapOptions *netmap_opts = netdev->opts->u.netmap.data; struct nm_desc *nmd; NetClientState *nc; Error *err = NULL; -- cgit v1.2.1