]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Attempt to start only drivers claiming support for a device
authorMichael Brown <mcb30@ipxe.org>
Tue, 8 Jul 2014 00:02:35 +0000 (01:02 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 8 Jul 2014 13:01:50 +0000 (14:01 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_driver.c

index 8d0c9354dea3835a87c44c754e943044c295bd9e..7d7d20593ce88bcccb5adeaea50db0588510c4cc 100644 (file)
@@ -269,6 +269,13 @@ efi_driver_start ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
 
        /* Try to start this device */
        for_each_table_entry ( efidrv, EFI_DRIVERS ) {
+               if ( ( rc = efidrv->supported ( device ) ) != 0 ) {
+                       DBGC ( device, "EFIDEV %p %s is not supported by "
+                              "driver \"%s\": %s\n",
+                              device, efi_devpath_text ( efidev->path ),
+                              efidrv->name, strerror ( rc ) );
+                       continue;
+               }
                if ( ( rc = efidrv->start ( efidev ) ) == 0 ) {
                        efidev->driver = efidrv;
                        DBGC ( device, "EFIDRV %p %s using driver \"%s\"\n",