diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-08-12 11:30:19 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-08-12 11:30:19 -0700 |
commit | 31a021035830d85d3a34ac6de221003478be7ca6 (patch) | |
tree | 35856fcb0a12b48c5ed38d5db95104c242e75c9a /com32/modules/ethersel.c | |
parent | 6a2119c0fc30aa0ccdfc43e138255f6875f2b714 (diff) | |
download | syslinux-31a021035830d85d3a34ac6de221003478be7ca6.tar.gz |
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 <hpa@zytor.com>
Diffstat (limited to 'com32/modules/ethersel.c')
-rw-r--r-- | com32/modules/ethersel.c | 15 |
1 files changed, 8 insertions, 7 deletions
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); |