boot: Drop use of LibLocateProtocol
This commit is contained in:
@@ -48,7 +48,7 @@ EFI_STATUS console_key_read(UINT64 *key, UINT64 timeout_usec) {
|
||||
|
||||
if (!checked) {
|
||||
/* Get the *first* TextInputEx device.*/
|
||||
err = LibLocateProtocol(&SimpleTextInputExProtocol, (void **) &extraInEx);
|
||||
err = BS->LocateProtocol(&SimpleTextInputExProtocol, NULL, (void **) &extraInEx);
|
||||
if (EFI_ERROR(err) || BS->CheckEvent(extraInEx->WaitForKeyEx) == EFI_INVALID_PARAMETER)
|
||||
/* If WaitForKeyEx fails here, the firmware pretends it talks this
|
||||
* protocol, but it really doesn't. */
|
||||
@@ -185,7 +185,7 @@ EFI_STATUS query_screen_resolution(UINT32 *ret_w, UINT32 *ret_h) {
|
||||
EFI_STATUS err;
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL *go;
|
||||
|
||||
err = LibLocateProtocol(&GraphicsOutputProtocol, (void **) &go);
|
||||
err = BS->LocateProtocol(&GraphicsOutputProtocol, NULL, (void **) &go);
|
||||
if (EFI_ERROR(err))
|
||||
return err;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ static EFI_STATUS devicetree_fixup(struct devicetree_state *state, UINTN len) {
|
||||
|
||||
assert(state);
|
||||
|
||||
err = LibLocateProtocol(&EfiDtFixupProtocol, (void **)&fixup);
|
||||
err = BS->LocateProtocol(&EfiDtFixupProtocol, NULL, (void **) &fixup);
|
||||
if (EFI_ERROR(err))
|
||||
return log_error_status_stall(EFI_SUCCESS,
|
||||
L"Could not locate device tree fixup protocol, skipping.");
|
||||
|
||||
@@ -19,7 +19,7 @@ EFI_STATUS graphics_mode(BOOLEAN on) {
|
||||
BOOLEAN stdin_locked;
|
||||
EFI_STATUS err;
|
||||
|
||||
err = LibLocateProtocol((EFI_GUID*) EFI_CONSOLE_CONTROL_GUID, (void **)&ConsoleControl);
|
||||
err = BS->LocateProtocol((EFI_GUID *) EFI_CONSOLE_CONTROL_GUID, NULL, (void **) &ConsoleControl);
|
||||
if (EFI_ERROR(err))
|
||||
/* console control protocol is nonstandard and might not exist. */
|
||||
return err == EFI_NOT_FOUND ? EFI_SUCCESS : err;
|
||||
|
||||
@@ -84,7 +84,7 @@ static EFI_TCG *tcg1_interface_check(void) {
|
||||
UINT32 features;
|
||||
EFI_TCG *tcg;
|
||||
|
||||
status = LibLocateProtocol((EFI_GUID*) EFI_TCG_GUID, (void **) &tcg);
|
||||
status = BS->LocateProtocol((EFI_GUID *) EFI_TCG_GUID, NULL, (void **) &tcg);
|
||||
if (EFI_ERROR(status))
|
||||
return NULL;
|
||||
|
||||
@@ -113,7 +113,7 @@ static EFI_TCG2 * tcg2_interface_check(void) {
|
||||
EFI_STATUS status;
|
||||
EFI_TCG2 *tcg;
|
||||
|
||||
status = LibLocateProtocol((EFI_GUID*) EFI_TCG2_GUID, (void **) &tcg);
|
||||
status = BS->LocateProtocol((EFI_GUID *) EFI_TCG2_GUID, NULL, (void **) &tcg);
|
||||
if (EFI_ERROR(status))
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ static EFI_STATUS acquire_rng(UINTN size, void **ret) {
|
||||
|
||||
/* Try to acquire the specified number of bytes from the UEFI RNG */
|
||||
|
||||
err = LibLocateProtocol((EFI_GUID*) EFI_RNG_GUID, (void**) &rng);
|
||||
err = BS->LocateProtocol((EFI_GUID *) EFI_RNG_GUID, NULL, (void **) &rng);
|
||||
if (EFI_ERROR(err))
|
||||
return err;
|
||||
if (!rng)
|
||||
|
||||
@@ -279,7 +279,7 @@ EFI_STATUS graphics_splash(const UINT8 *content, UINTN len, const EFI_GRAPHICS_O
|
||||
background = &pixel;
|
||||
}
|
||||
|
||||
err = LibLocateProtocol(&GraphicsOutputProtocol, (void **)&GraphicsOutput);
|
||||
err = BS->LocateProtocol(&GraphicsOutputProtocol, NULL, (void **) &GraphicsOutput);
|
||||
if (EFI_ERROR(err))
|
||||
return err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user