Browse Source

[efi] Report errors from attempting to disconnect existing drivers

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Curtis Larsen 9 years ago
parent
commit
27e9ee147a
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      src/interface/efi/efi_driver.c

+ 8
- 1
src/interface/efi/efi_driver.c View File

495
 	DBGC2_EFI_PROTOCOLS ( device, device );
495
 	DBGC2_EFI_PROTOCOLS ( device, device );
496
 	DBGC ( device, "EFIDRV %p %s disconnecting existing drivers\n",
496
 	DBGC ( device, "EFIDRV %p %s disconnecting existing drivers\n",
497
 	       device, efi_handle_name ( device ) );
497
 	       device, efi_handle_name ( device ) );
498
-	bs->DisconnectController ( device, NULL, NULL );
498
+	if ( ( efirc = bs->DisconnectController ( device, NULL,
499
+						  NULL ) ) != 0 ) {
500
+		rc = -EEFI ( efirc );
501
+		DBGC ( device, "EFIDRV %p %s could not disconnect existing "
502
+		       "drivers: %s\n", device, efi_handle_name ( device ),
503
+		       strerror ( rc ) );
504
+		/* Ignore the error and attempt to connect our drivers */
505
+	}
499
 	DBGC2 ( device, "EFIDRV %p %s after disconnecting:\n",
506
 	DBGC2 ( device, "EFIDRV %p %s after disconnecting:\n",
500
 		device, efi_handle_name ( device ) );
507
 		device, efi_handle_name ( device ) );
501
 	DBGC2_EFI_PROTOCOLS ( device, device );
508
 	DBGC2_EFI_PROTOCOLS ( device, device );

Loading…
Cancel
Save