]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Report errors from attempting to disconnect existing drivers
authorCurtis Larsen <larsen@dixie.edu>
Tue, 5 Aug 2014 15:45:01 +0000 (16:45 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 5 Aug 2014 15:45:51 +0000 (16:45 +0100)
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_driver.c

index 1f9c74911316db4a0b84a09a3712ce2bbb72646b..b9617cbf0e02d044371a8becca72e3083389acb2 100644 (file)
@@ -495,7 +495,14 @@ static int efi_driver_connect ( EFI_HANDLE device ) {
        DBGC2_EFI_PROTOCOLS ( device, device );
        DBGC ( device, "EFIDRV %p %s disconnecting existing drivers\n",
               device, efi_handle_name ( device ) );
-       bs->DisconnectController ( device, NULL, NULL );
+       if ( ( efirc = bs->DisconnectController ( device, NULL,
+                                                 NULL ) ) != 0 ) {
+               rc = -EEFI ( efirc );
+               DBGC ( device, "EFIDRV %p %s could not disconnect existing "
+                      "drivers: %s\n", device, efi_handle_name ( device ),
+                      strerror ( rc ) );
+               /* Ignore the error and attempt to connect our drivers */
+       }
        DBGC2 ( device, "EFIDRV %p %s after disconnecting:\n",
                device, efi_handle_name ( device ) );
        DBGC2_EFI_PROTOCOLS ( device, device );