mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OpenCoreUefi: Simplify connect all code
This commit is contained in:
parent
ac7b337d1b
commit
355752066c
@ -156,11 +156,10 @@ OcConnectDrivers (
|
||||
UINTN HandleCount;
|
||||
EFI_HANDLE *HandleBuffer;
|
||||
UINTN Index;
|
||||
VOID *DriverBinding;
|
||||
|
||||
Status = gBS->LocateHandleBuffer (
|
||||
AllHandles,
|
||||
NULL,
|
||||
ByProtocol,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
NULL,
|
||||
&HandleCount,
|
||||
&HandleBuffer
|
||||
@ -170,19 +169,6 @@ OcConnectDrivers (
|
||||
}
|
||||
|
||||
for (Index = 0; Index < HandleCount; ++Index) {
|
||||
Status = gBS->HandleProtocol (
|
||||
HandleBuffer[Index],
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
&DriverBinding
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
//
|
||||
// Calling ConnectController on non-driver results in freezes on APTIO IV.
|
||||
//
|
||||
continue;
|
||||
}
|
||||
|
||||
gBS->ConnectController (HandleBuffer[Index], NULL, NULL, TRUE);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user