aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-02-05 04:14:41 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-02-05 04:14:41 +0000
commita41b2ff2ddd0ba05ac2ca1bb657603b1d09dc9bc (patch)
tree3dfb995363cc4046f782911fbf509ae070845a7f /hw/pci.c
parentd861b05ea30e6ac177de9b679da96194ebe21afc (diff)
downloadqemu-a41b2ff2ddd0ba05ac2ca1bb657603b1d09dc9bc.zip
qemu-a41b2ff2ddd0ba05ac2ca1bb657603b1d09dc9bc.tar.gz
qemu-a41b2ff2ddd0ba05ac2ca1bb657603b1d09dc9bc.tar.bz2
Allow selection of emulated network card.
rtl8139 emulation. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1745 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/pci.c b/hw/pci.c
index f3456ba..e415ccf 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1837,3 +1837,17 @@ void pci_bios_init(void)
}
}
}
+
+/* Initialize a PCI NIC. */
+void pci_nic_init(PCIBus *bus, NICInfo *nd)
+{
+ if (strcmp(nd->model, "ne2k_pci") == 0) {
+ pci_ne2000_init(bus, nd);
+ } else if (strcmp(nd->model, "rtl8139") == 0) {
+ pci_rtl8139_init(bus, nd);
+ } else {
+ fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd->model);
+ exit (1);
+ }
+}
+