summaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/pci.c b/hw/pci.c
index c46410aae3..c656bd047c 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -806,6 +806,17 @@ static const char * const pci_nic_names[] = {
NULL
};
+int pci_nic_supported(const char *model)
+{
+ int i;
+
+ for (i = 0; pci_nic_names[i]; i++)
+ if (strcmp(model, pci_nic_names[i]) == 0)
+ return 1;
+
+ return 0;
+}
+
/* Initialize a PCI NIC. */
PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model,
const char *default_devaddr)