From: Laszlo Ersek <lersek@redhat.com>
To: qemu-devel@nongnu.org, lersek@redhat.com
Subject: [Qemu-devel] [PATCH 16/16] remove unused QemuOpts parameter from net init functions
Date: Tue, 22 May 2012 12:45:55 +0200 [thread overview]
Message-ID: <1337683555-13301-17-git-send-email-lersek@redhat.com> (raw)
In-Reply-To: <1337683555-13301-1-git-send-email-lersek@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
net/dump.h | 5 ++---
net/slirp.h | 5 ++---
net/socket.h | 5 ++---
net/tap.h | 9 ++++-----
net/vde.h | 5 ++---
net.c | 14 ++++++--------
net/dump.c | 4 ++--
net/slirp.c | 4 ++--
net/socket.c | 4 ++--
net/tap-win32.c | 4 ++--
net/tap.c | 8 ++++----
net/vde.c | 4 ++--
12 files changed, 32 insertions(+), 39 deletions(-)
diff --git a/net/dump.h b/net/dump.h
index 85ac00b..0fa2dd7 100644
--- a/net/dump.h
+++ b/net/dump.h
@@ -25,10 +25,9 @@
#define QEMU_NET_DUMP_H
#include "net.h"
-#include "qemu-common.h"
#include "qapi-types.h"
-int net_init_dump(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_dump(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
#endif /* QEMU_NET_DUMP_H */
diff --git a/net/slirp.h b/net/slirp.h
index ef13a65..fa7eacc 100644
--- a/net/slirp.h
+++ b/net/slirp.h
@@ -26,13 +26,12 @@
#include "qemu-common.h"
#include "qdict.h"
-#include "qemu-option.h"
#include "qapi-types.h"
#ifdef CONFIG_SLIRP
-int net_init_slirp(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_slirp(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
void net_slirp_hostfwd_add(Monitor *mon, const QDict *qdict);
void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict);
diff --git a/net/socket.h b/net/socket.h
index e44d26e..c4809ad 100644
--- a/net/socket.h
+++ b/net/socket.h
@@ -25,10 +25,9 @@
#define QEMU_NET_SOCKET_H
#include "net.h"
-#include "qemu-common.h"
#include "qapi-types.h"
-int net_init_socket(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_socket(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
#endif /* QEMU_NET_SOCKET_H */
diff --git a/net/tap.h b/net/tap.h
index f092129..19dea58 100644
--- a/net/tap.h
+++ b/net/tap.h
@@ -27,14 +27,13 @@
#define QEMU_NET_TAP_H
#include "qemu-common.h"
-#include "qemu-option.h"
#include "qapi-types.h"
#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
-int net_init_tap(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_tap(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required);
@@ -59,7 +58,7 @@ int tap_get_fd(VLANClientState *vc);
struct vhost_net;
struct vhost_net *tap_get_vhost_net(VLANClientState *vc);
-int net_init_bridge(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_bridge(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
#endif /* QEMU_NET_TAP_H */
diff --git a/net/vde.h b/net/vde.h
index 5fc17f9..ad502ef 100644
--- a/net/vde.h
+++ b/net/vde.h
@@ -25,13 +25,12 @@
#define QEMU_NET_VDE_H
#include "qemu-common.h"
-#include "qemu-option.h"
#include "qapi-types.h"
#ifdef CONFIG_VDE
-int net_init_vde(QemuOpts *opts, const NetClientOptions *new_opts,
- const char *name, VLANState *vlan);
+int net_init_vde(const NetClientOptions *opts, const char *name,
+ VLANState *vlan);
#endif /* CONFIG_VDE */
diff --git a/net.c b/net.c
index bd2fd23..687992a 100644
--- a/net.c
+++ b/net.c
@@ -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;
@@ -884,7 +882,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]);
@@ -919,7 +917,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) {
diff --git a/net/dump.c b/net/dump.c
index a1de09e..8d99bc3 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -144,8 +144,8 @@ static int net_dump_init(VLANState *vlan, const char *device,
return 0;
}
-int net_init_dump(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_dump(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
int len;
const char *file;
diff --git a/net/slirp.c b/net/slirp.c
index 166304c..fc67f81 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -670,8 +670,8 @@ net_init_slirp_configs(const StringList *fwd, int flags)
}
}
-int net_init_slirp(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_slirp(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
struct slirp_config_str *config;
char *vnet;
diff --git a/net/socket.c b/net/socket.c
index e3cba20..600c287 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -586,8 +586,8 @@ static int net_socket_udp_init(VLANState *vlan,
return 0;
}
-int net_init_socket(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_socket(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
const NetdevSocketOptions *sock;
diff --git a/net/tap-win32.c b/net/tap-win32.c
index b6099cd..2328072 100644
--- a/net/tap-win32.c
+++ b/net/tap-win32.c
@@ -699,8 +699,8 @@ static int tap_win32_init(VLANState *vlan, const char *model,
return 0;
}
-int net_init_tap(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_tap(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
const NetdevTapOptions *tap;
diff --git a/net/tap.c b/net/tap.c
index fdaab2b..a996b07 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -512,8 +512,8 @@ static int net_bridge_run_helper(const char *helper, const char *bridge)
return -1;
}
-int net_init_bridge(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_bridge(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
const NetdevBridgeOptions *bridge;
const char *helper, *br;
@@ -585,8 +585,8 @@ static int net_tap_init(const NetdevTapOptions *tap, int *vnet_hdr,
return fd;
}
-int net_init_tap(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_tap(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
const NetdevTapOptions *tap;
diff --git a/net/vde.c b/net/vde.c
index 35e8113..dcb3c0b 100644
--- a/net/vde.c
+++ b/net/vde.c
@@ -110,8 +110,8 @@ static int net_vde_init(VLANState *vlan, const char *model,
return 0;
}
-int net_init_vde(QemuOpts *old_opts, const NetClientOptions *opts,
- const char *name, VLANState *vlan)
+int net_init_vde(const NetClientOptions *opts, const char *name,
+ VLANState *vlan)
{
int port, mode;
--
1.7.1
next prev parent reply other threads:[~2012-05-22 10:45 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 10:45 [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing Laszlo Ersek
2012-05-22 10:45 ` [Qemu-devel] [PATCH 01/16] qapi: fix error propagation Laszlo Ersek
2012-05-22 10:45 ` [Qemu-devel] [PATCH 02/16] qapi: introduce "size" type Laszlo Ersek
2012-06-05 20:39 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 03/16] expose QemuOpt and QemuOpts struct definitions to interested parties Laszlo Ersek
2012-06-05 20:40 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 04/16] qapi: introduce OptsVisitor Laszlo Ersek
2012-06-05 21:12 ` Paolo Bonzini
2012-06-06 11:12 ` Laszlo Ersek
2012-06-06 12:02 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 05/16] qapi schema: remove trailing whitespace Laszlo Ersek
2012-06-05 20:40 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 06/16] qapi schema: add Netdev types Laszlo Ersek
2012-06-05 21:08 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 07/16] hw, net: "net_client_type" -> "NetClientOptionsKind" (qapi-generated) Laszlo Ersek
2012-06-05 20:41 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 08/16] convert net_client_init() to OptsVisitor Laszlo Ersek
2012-06-05 20:46 ` Paolo Bonzini
2012-06-05 21:07 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 09/16] convert net_init_nic() to NetClientOptions Laszlo Ersek
2012-06-05 20:50 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 10/16] convert net_init_dump() " Laszlo Ersek
2012-06-05 20:51 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 11/16] convert net_init_slirp() " Laszlo Ersek
2012-06-05 20:53 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 12/16] convert net_init_socket() " Laszlo Ersek
2012-06-05 21:02 ` Paolo Bonzini
2012-06-05 21:14 ` Eric Blake
2012-06-05 21:27 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 13/16] convert net_init_vde() " Laszlo Ersek
2012-06-05 21:04 ` Paolo Bonzini
2012-05-22 10:45 ` [Qemu-devel] [PATCH 14/16] convert net_init_tap() " Laszlo Ersek
2012-05-22 10:45 ` [Qemu-devel] [PATCH 15/16] convert net_init_bridge() " Laszlo Ersek
2012-06-05 21:05 ` Paolo Bonzini
2012-06-06 12:16 ` Laszlo Ersek
2012-06-06 14:13 ` Paolo Bonzini
2012-05-22 10:45 ` Laszlo Ersek [this message]
2012-06-05 21:06 ` [Qemu-devel] [PATCH 16/16] remove unused QemuOpts parameter from net init functions Paolo Bonzini
2012-06-05 21:13 ` [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing Paolo Bonzini
2012-06-06 13:03 ` Laszlo Ersek
2012-06-06 13:31 ` Andreas Färber
2012-06-06 14:10 ` Paolo Bonzini
2012-06-06 14:34 ` Andreas Färber
2012-06-06 14:43 ` Paolo Bonzini
2012-06-06 15:16 ` Michael Roth
2012-06-06 15:30 ` Laszlo Ersek
2012-06-06 15:58 ` Michael Roth
2012-06-06 16:14 ` Michael Roth
2012-06-06 16:47 ` Paolo Bonzini
2012-06-06 16:49 ` Laszlo Ersek
2012-06-06 17:05 ` Laszlo Ersek
2012-06-06 20:09 ` Michael Roth
2012-06-06 20:59 ` Andreas Färber
2012-06-07 11:32 ` Laszlo Ersek
2012-06-07 12:17 ` Andreas Färber
2012-06-07 11:29 ` Laszlo Ersek
2012-06-07 15:29 ` Michael Roth
2012-06-07 15:46 ` Paolo Bonzini
2012-06-09 11:21 ` Laszlo Ersek
2012-06-06 15:31 ` Michael Roth
2012-06-06 14:09 ` Paolo Bonzini
2012-06-09 15:30 ` Laszlo Ersek
2012-06-11 7:06 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337683555-13301-17-git-send-email-lersek@redhat.com \
--to=lersek@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).