diff mbox

[RFC,4/9] net: adjust nic init API

Message ID 1332740423-8426-7-git-send-email-zwu.kernel@gmail.com
State New
Headers show

Commit Message

Zhiyong Wu March 26, 2012, 5:40 a.m. UTC
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
 net.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/net.c b/net.c
index ff8ddaf..22ed51b 100644
--- a/net.c
+++ b/net.c
@@ -549,15 +549,17 @@  int net_handle_fd_param(Monitor *mon, const char *param)
     return fd;
 }
 
-static int net_init_nic(QemuOpts *opts,
-                        Monitor *mon,
-                        const char *name,
-                        NetClientState *peer)
+static int net_init_nic(NETDevice *host_dev)
 {
     int idx;
     NICInfo *nd;
     const char *netdev;
 
+    QemuOpts *opts = host_dev->opts;
+    //Monitor *mon = host_dev->mon;
+    char *name = g_strdup(host_dev->name);
+    NetClientState *peer = host_dev->peer;
+
     idx = nic_get_free_idx();
     if (idx == -1 || nb_nics >= MAX_NICS) {
         error_report("Too Many NICs");