]> Git Repo - qemu.git/commitdiff
net: remove id field from NICInfo
authorMark McLoughlin <[email protected]>
Thu, 8 Oct 2009 18:58:22 +0000 (19:58 +0100)
committerAnthony Liguori <[email protected]>
Thu, 15 Oct 2009 14:32:00 +0000 (09:32 -0500)
Just use the name field instead since we now use the id paramater as
the name, if supplied. Only implication with this change is that if
id is not supplied, the value of the name paramater is used as an
id.

Patchworks-ID: 35512
Signed-off-by: Mark McLoughlin <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
hw/pci.c
net.c
net.h

index 49651d09f0c9a7c906427da3e5f42ed507a50a63..abf07cabd0ebda0d69b31ccfef4e6f7a4eb41c85 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -857,8 +857,8 @@ PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model,
 
     pci_dev = pci_create(bus, devfn, pci_nic_names[i]);
     dev = &pci_dev->qdev;
-    if (nd->id)
-        dev->id = qemu_strdup(nd->id);
+    if (nd->name)
+        dev->id = qemu_strdup(nd->name);
     dev->nd = nd;
     if (qdev_init(dev) < 0)
         return NULL;
diff --git a/net.c b/net.c
index 8895e873af2d94c7ce18a24e5e126efae5c0c35b..87dcf06a3eec86bfb9051746ff51ceb012b64f61 100644 (file)
--- a/net.c
+++ b/net.c
@@ -2414,9 +2414,6 @@ static int net_init_nic(QemuOpts *opts, Monitor *mon, const char *name)
     if (name) {
         nd->name = qemu_strdup(name);
     }
-    if (qemu_opts_id(opts)) {
-        nd->id = qemu_strdup(qemu_opts_id(opts));
-    }
     if (qemu_opt_get(opts, "model")) {
         nd->model = qemu_strdup(qemu_opt_get(opts, "model"));
     }
@@ -3032,7 +3029,6 @@ void net_client_uninit(NICInfo *nd)
     qemu_free(nd->model);
     qemu_free(nd->name);
     qemu_free(nd->devaddr);
-    qemu_free(nd->id);
 
     nd->used = 0;
 }
diff --git a/net.h b/net.h
index 49e160d32226980c6f575432fec970ad1277dc5b..164ea3d7652f3a78a8116ca3139d3f80c11ae7a6 100644 (file)
--- a/net.h
+++ b/net.h
@@ -98,7 +98,6 @@ struct NICInfo {
     char *model;
     char *name;
     char *devaddr;
-    char *id;
     VLANState *vlan;
     VLANClientState *vc;
     void *private;
This page took 0.03658 seconds and 4 git commands to generate.