aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/pci.c b/hw/pci.c
index b3856e72ab..0d51714257 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -822,6 +822,8 @@ PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model,
if (strcmp(nd->model, pci_nic_models[i]) == 0) {
pci_dev = pci_create(pci_nic_names[i], devaddr);
dev = &pci_dev->qdev;
+ if (nd->id)
+ dev->id = qemu_strdup(nd->id);
dev->nd = nd;
qdev_init(dev);
nd->private = dev;