diff options
author | Laszlo Ersek <lersek@redhat.com> | 2012-07-17 16:17:21 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-07-23 11:55:18 +0100 |
commit | 1a0c09583df097d62b0580f9073ba45c9d18351a (patch) | |
tree | 576c79028b3f243610a9156b5f3fd84ebca73b1a /net.c | |
parent | f79b51b081e48fb307a9438eb0e7326806bc19d3 (diff) |
remove unused QemuOpts parameter from net init functions
v1->v2:
- unchanged
v2->v3:
- keep "qemu-option.h" included in "net/slirp.h"
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'net.c')
-rw-r--r-- | net.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -748,8 +748,8 @@ int net_handle_fd_param(Monitor *mon, const char *param) return fd; } -static int net_init_nic(QemuOpts *old_opts, const NetClientOptions *opts, - const char *name, VLANState *vlan) +static int net_init_nic(const NetClientOptions *opts, const char *name, + VLANState *vlan) { int idx; NICInfo *nd; @@ -813,8 +813,7 @@ static int net_init_nic(QemuOpts *old_opts, const NetClientOptions *opts, static int (* const net_client_init_fun[NET_CLIENT_OPTIONS_KIND_MAX])( - QemuOpts *old_opts, - const NetClientOptions *new_opts, + const NetClientOptions *opts, const char *name, VLANState *vlan) = { [NET_CLIENT_OPTIONS_KIND_NIC] = net_init_nic, @@ -833,8 +832,7 @@ static int (* const net_client_init_fun[NET_CLIENT_OPTIONS_KIND_MAX])( }; -static int net_client_init1(const void *object, int is_netdev, - QemuOpts *old_opts, Error **errp) +static int net_client_init1(const void *object, int is_netdev, Error **errp) { union { const Netdev *netdev; @@ -885,7 +883,7 @@ static int net_client_init1(const void *object, int is_netdev, vlan = qemu_find_vlan(u.net->has_vlan ? u.net->vlan : 0, true); } - if (net_client_init_fun[opts->kind](old_opts, opts, name, vlan) < 0) { + if (net_client_init_fun[opts->kind](opts, name, vlan) < 0) { /* TODO push error reporting into init() methods */ error_set(errp, QERR_DEVICE_INIT_FAILED, NetClientOptionsKind_lookup[opts->kind]); @@ -920,7 +918,7 @@ int net_client_init(QemuOpts *opts, int is_netdev, Error **errp) } if (!err) { - ret = net_client_init1(object, is_netdev, opts, &err); + ret = net_client_init1(object, is_netdev, &err); } if (object) { |