From 31a021035830d85d3a34ac6de221003478be7ca6 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 12 Aug 2008 11:30:19 -0700 Subject: pci: revamp the PCI system to have a hierarchial format Create the concept of a PCI domain, as a hierarcy of busses, devices and functions. This avoids large static-sized arrays and allows for geographical addressing of devices. Signed-off-by: H. Peter Anvin --- com32/modules/ethersel.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'com32/modules/ethersel.c') diff --git a/com32/modules/ethersel.c b/com32/modules/ethersel.c index d200d627..9bd445c0 100644 --- a/com32/modules/ethersel.c +++ b/com32/modules/ethersel.c @@ -192,18 +192,19 @@ parse_config(const char *filename) int main(int argc, char *argv[]) { struct match *list, *match; - struct pci_device_list pci_device_list; - struct pci_bus_list pci_bus_list; + struct pci_domain *pci_domain; openconsole(&dev_null_r, &dev_stdcon_w); - pci_scan(&pci_bus_list,&pci_device_list); + pci_domain = pci_scan(); - list = parse_config(argc < 2 ? NULL : argv[1]); + if (pci_domain) { + list = parse_config(argc < 2 ? NULL : argv[1]); - match = find_pci_device(&pci_device_list,list); + match = find_pci_device(pci_domain, list); - if ( match ) - syslinux_run_command(match->filename); + if ( match ) + syslinux_run_command(match->filename); + } /* On error, return to the command line */ fputs("Error: no recognized network card found!\n", stderr); -- cgit v1.2.1