Browse Source

[efi] Attempt to start only drivers claiming support for a device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 years ago
parent
commit
56b2f66dd2
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      src/interface/efi/efi_driver.c

+ 7
- 0
src/interface/efi/efi_driver.c View File

269
 
269
 
270
 	/* Try to start this device */
270
 	/* Try to start this device */
271
 	for_each_table_entry ( efidrv, EFI_DRIVERS ) {
271
 	for_each_table_entry ( efidrv, EFI_DRIVERS ) {
272
+		if ( ( rc = efidrv->supported ( device ) ) != 0 ) {
273
+			DBGC ( device, "EFIDEV %p %s is not supported by "
274
+			       "driver \"%s\": %s\n",
275
+			       device, efi_devpath_text ( efidev->path ),
276
+			       efidrv->name, strerror ( rc ) );
277
+			continue;
278
+		}
272
 		if ( ( rc = efidrv->start ( efidev ) ) == 0 ) {
279
 		if ( ( rc = efidrv->start ( efidev ) ) == 0 ) {
273
 			efidev->driver = efidrv;
280
 			efidev->driver = efidrv;
274
 			DBGC ( device, "EFIDRV %p %s using driver \"%s\"\n",
281
 			DBGC ( device, "EFIDRV %p %s using driver \"%s\"\n",

Loading…
Cancel
Save