mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 01:51:33 +00:00
efi_loader: fix SetMode()
Correct the check of the mode number in SetMode() service of the simple text output protocol. Clear the screen in SetMode(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
c5b63bec2f
commit
2ad238fcc4
1 changed files with 14 additions and 17 deletions
|
@ -316,23 +316,6 @@ static efi_status_t EFIAPI efi_cout_query_mode(
|
||||||
return EFI_EXIT(EFI_SUCCESS);
|
return EFI_EXIT(EFI_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static efi_status_t EFIAPI efi_cout_set_mode(
|
|
||||||
struct efi_simple_text_output_protocol *this,
|
|
||||||
unsigned long mode_number)
|
|
||||||
{
|
|
||||||
EFI_ENTRY("%p, %ld", this, mode_number);
|
|
||||||
|
|
||||||
|
|
||||||
if (mode_number > efi_con_mode.max_mode)
|
|
||||||
return EFI_EXIT(EFI_UNSUPPORTED);
|
|
||||||
|
|
||||||
efi_con_mode.mode = mode_number;
|
|
||||||
efi_con_mode.cursor_column = 0;
|
|
||||||
efi_con_mode.cursor_row = 0;
|
|
||||||
|
|
||||||
return EFI_EXIT(EFI_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
unsigned int fg;
|
unsigned int fg;
|
||||||
unsigned int bg;
|
unsigned int bg;
|
||||||
|
@ -378,6 +361,20 @@ static efi_status_t EFIAPI efi_cout_clear_screen(
|
||||||
return EFI_EXIT(EFI_SUCCESS);
|
return EFI_EXIT(EFI_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static efi_status_t EFIAPI efi_cout_set_mode(
|
||||||
|
struct efi_simple_text_output_protocol *this,
|
||||||
|
unsigned long mode_number)
|
||||||
|
{
|
||||||
|
EFI_ENTRY("%p, %ld", this, mode_number);
|
||||||
|
|
||||||
|
if (mode_number >= efi_con_mode.max_mode)
|
||||||
|
return EFI_EXIT(EFI_UNSUPPORTED);
|
||||||
|
efi_con_mode.mode = mode_number;
|
||||||
|
EFI_CALL(efi_cout_clear_screen(this));
|
||||||
|
|
||||||
|
return EFI_EXIT(EFI_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
static efi_status_t EFIAPI efi_cout_reset(
|
static efi_status_t EFIAPI efi_cout_reset(
|
||||||
struct efi_simple_text_output_protocol *this,
|
struct efi_simple_text_output_protocol *this,
|
||||||
char extended_verification)
|
char extended_verification)
|
||||||
|
|
Loading…
Add table
Reference in a new issue