From a41b2ff2ddd0ba05ac2ca1bb657603b1d09dc9bc Mon Sep 17 00:00:00 2001 From: pbrook Date: Sun, 5 Feb 2006 04:14:41 +0000 Subject: Allow selection of emulated network card. rtl8139 emulation. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1745 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/pci.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'hw/pci.c') diff --git a/hw/pci.c b/hw/pci.c index f3456baca8..e415ccf6c5 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); + } +} + -- cgit 1.4.1