aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-03-23 18:20:38 +0100
committerErwan Velu <erwan.velu@free.fr>2009-03-26 18:26:59 +0100
commitdb6dcbb38676462e452fa0ecaf4897f4dba00f09 (patch)
tree8d27b52a30108f0867a1dcadf9eff61908c2b050
parentc092605b1f2f9419e99308f63c6c1fdd8c231f63 (diff)
downloadsyslinux.git-db6dcbb38676462e452fa0ecaf4897f4dba00f09.tar.gz
syslinux.git-db6dcbb38676462e452fa0ecaf4897f4dba00f09.tar.xz
syslinux.git-db6dcbb38676462e452fa0ecaf4897f4dba00f09.zip
pci: Check if configuration type is PCI_CFG_NONE
Impact: prevent from grabbing configuration when PCI is PCI_CFG_NONE Signed-off-by: Sebastian Herbszt (herbszt@gmx.de)
-rw-r--r--com32/lib/pci/scan.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/com32/lib/pci/scan.c b/com32/lib/pci/scan.c
index f73853f6..adfec596 100644
--- a/com32/lib/pci/scan.c
+++ b/com32/lib/pci/scan.c
@@ -443,6 +443,10 @@ struct pci_domain *pci_scan(void)
cfgtype = pci_set_config_type(PCI_CFG_AUTO);
dprintf("PCI configuration type %d\n", cfgtype);
+
+ if (cfgtype == PCI_CFG_NONE)
+ return NULL;
+
dprintf("Scanning PCI Buses\n");
for (nbus = 0; nbus < MAX_PCI_BUSES; nbus++) {
@@ -519,7 +523,10 @@ void gather_additional_pci_config(struct pci_domain *domain)
unsigned int nbus, ndev, nfunc, maxfunc;
pciaddr_t a;
int cfgtype;
+
cfgtype = pci_set_config_type(PCI_CFG_AUTO);
+ if (cfgtype == PCI_CFG_NONE)
+ return;
for (nbus = 0; nbus < MAX_PCI_BUSES; nbus++) {
bus = NULL;