aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/pci.c4
-rw-r--r--net.c4
-rw-r--r--net.h1
3 files changed, 2 insertions, 7 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 49651d09f0..abf07cabd0 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 8895e873af..87dcf06a3e 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 49e160d322..164ea3d765 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;