diff options
| author | Heinrich Schuchardt <[email protected]> | 2025-03-10 07:13:43 +0100 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2025-04-19 12:45:48 +0200 |
| commit | 6cabeaf2d893b29c2ab0e3233c9b8c8f7fd28cf6 (patch) | |
| tree | 1fe2cade959ceeda4f98df6fd03145fb30890b18 /cmd/eficonfig.c | |
| parent | 71f497a6d3908574a1b1c3813c2a1385910f76bd (diff) | |
cmd: simplify eficonfig_init()
As the system table already has pointers to the Simple Text Input and
Output Protocols we can directly use these instead of calling
OpenProtocol.
Reviewed-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'cmd/eficonfig.c')
| -rw-r--r-- | cmd/eficonfig.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index e08b6ba4a5d..629bf1b82c7 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -2283,26 +2283,11 @@ static efi_status_t eficonfig_init(void) { efi_status_t ret = EFI_SUCCESS; static bool init; - struct efi_handler *handler; unsigned long columns, rows; if (!init) { - ret = efi_search_protocol(efi_root, &efi_guid_text_input_protocol, &handler); - if (ret != EFI_SUCCESS) - return ret; - - ret = efi_protocol_open(handler, (void **)&cin, efi_root, NULL, - EFI_OPEN_PROTOCOL_GET_PROTOCOL); - if (ret != EFI_SUCCESS) - return ret; - ret = efi_search_protocol(efi_root, &efi_guid_text_output_protocol, &handler); - if (ret != EFI_SUCCESS) - return ret; - - ret = efi_protocol_open(handler, (void **)&cout, efi_root, NULL, - EFI_OPEN_PROTOCOL_GET_PROTOCOL); - if (ret != EFI_SUCCESS) - return ret; + cout = systab.con_out; + cin = systab.con_in; cout->query_mode(cout, cout->mode->mode, &columns, &rows); avail_row = rows - (EFICONFIG_MENU_HEADER_ROW_NUM + |
