aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-07-15 13:43:35 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-16 17:28:53 -0500
commiteb54b6dcb8c6795c3667bcf1cb142639a36fdf85 (patch)
tree8b19ec6fb83e0a896164206f8a00811730a9f5a6 /hw
parentab73ff29ceb785aad3fc182e09d702ccee2e5559 (diff)
qdev: add id= support for pci nics.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-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;