aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib
diff options
context:
space:
mode:
authorSebastian Herbszt <herbszt@gmx.de>2008-08-11 22:00:29 +0200
committerH. Peter Anvin <hpa@zytor.com>2008-08-12 11:35:03 -0700
commitc1a1e5348196a0f26c4ab4e5f8e49c10b18474fb (patch)
tree0a395c7b3059af83308e83060bd420a57acb9a43 /com32/lib
parent12afeac408595245ef719d3a3b19a17e2a372eeb (diff)
downloadsyslinux.git-c1a1e5348196a0f26c4ab4e5f8e49c10b18474fb.tar.gz
syslinux.git-c1a1e5348196a0f26c4ab4e5f8e49c10b18474fb.tar.xz
syslinux.git-c1a1e5348196a0f26c4ab4e5f8e49c10b18474fb.zip
pci: fix pci_scan()
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/lib')
-rw-r--r--com32/lib/pci/scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/com32/lib/pci/scan.c b/com32/lib/pci/scan.c
index 073b6547..98df0dd3 100644
--- a/com32/lib/pci/scan.c
+++ b/com32/lib/pci/scan.c
@@ -322,10 +322,12 @@ struct pci_domain *pci_scan(void)
dprintf("Scanning PCI Buses\n");
for (nbus = 0; nbus < MAX_PCI_BUSES; nbus++) {
- dprintf("Probing bus 0x%02x... \n", bus);
+ dprintf("Probing bus 0x%02x... \n", nbus);
+ bus = NULL;
for (ndev = 0; ndev < MAX_PCI_DEVICES; ndev++) {
maxfunc = 1; /* Assume a single-function device */
+ slot = NULL;
for (nfunc = 0; nfunc < maxfunc; nfunc++) {
a = pci_mkaddr(nbus, ndev, nfunc, 0);
@@ -372,7 +374,7 @@ struct pci_domain *pci_scan(void)
dprintf
("Scanning: BUS %02x DID %08x (%04x:%04x) SID %08x RID %02x\n",
- bus, did, did >> 16, (did << 16) >> 16,
+ nbus, did, did >> 16, (did << 16) >> 16,
sid, rcid & 0xff);
}
}