Allow selection of emulated network card.

rtl8139 emulation.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1745 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
pbrook 2006-02-05 04:14:41 +00:00
parent d861b05ea3
commit a41b2ff2dd
13 changed files with 2983 additions and 25 deletions

View file

@ -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);
}
}