[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/16] net: remove id field from NICInfo
From: |
Mark McLoughlin |
Subject: |
[Qemu-devel] [PATCH 06/16] net: remove id field from NICInfo |
Date: |
Thu, 8 Oct 2009 19:58:22 +0100 |
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.
Signed-off-by: Mark McLoughlin <address@hidden>
---
hw/pci.c | 4 ++--
net.c | 4 ----
net.h | 1 -
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 49651d0..abf07ca 100644
--- 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 8895e87..87dcf06 100644
--- 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 49e160d..164ea3d 100644
--- 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;
--
1.6.2.5
- [Qemu-devel] [PATCH 00/16] Add a -netdev option, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 04/16] net: remove unused qemu_handler_true(), Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 09/16] net: add QemuOptsList arg to net_client_parse(), Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 10/16] net: add -netdev option, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 07/16] net: use qtailq for vlan and client lists, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 01/16] slirp: fix !CONFIG_SLIRP compilation, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 03/16] net: pass monitor handle to client init functions, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 15/16] net: refactor packet queueing code, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 06/16] net: remove id field from NICInfo,
Mark McLoughlin <=
- [Qemu-devel] [PATCH 05/16] net: handle id= parameter for -net, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 08/16] net: allow clients not associated with a vlan, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 13/16] net: add -net nic,netdev= option, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 14/16] net: allow NICs to be connected to netdevs, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 11/16] net: handle -netdevice options, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 12/16] net: maintain a list of vlan-less clients, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 02/16] hotplug: safely iterate bus's sibling list while removing a device, Mark McLoughlin, 2009/10/08
- [Qemu-devel] [PATCH 16/16] net: add queue for peer-to-peer packet forwarding, Mark McLoughlin, 2009/10/08