diff --git a/ChangeLog b/ChangeLog index d89cb8618..a4692b5a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-01-03 Colin Watson + + * grub-core/bus/pci.c (grub_pci_iterate): Skip remaining functions + on devices that do not implement function 0. + 2011-01-03 Dave Vasilevsky * grub-core/fs/hfsplus.c: Make parent unsigned. diff --git a/grub-core/bus/pci.c b/grub-core/bus/pci.c index bf14a8653..11101d42b 100644 --- a/grub-core/bus/pci.c +++ b/grub-core/bus/pci.c @@ -90,7 +90,14 @@ grub_pci_iterate (grub_pci_iteratefunc_t hook) /* Check if there is a device present. */ if (id >> 16 == 0xFFFF) - continue; + { + if (dev.function == 0) + /* Devices are required to implement function 0, so if + it's missing then there is no device here. */ + break; + else + continue; + } #ifdef GRUB_MACHINE_MIPS_YEELOONG /* Skip ghosts. */