efi_loader: avoid EFI_CALL() for clearing screen
Carve out function efi_clear_screen. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
c98f6fed93
commit
f32723663b
1 changed files with 17 additions and 9 deletions
|
@ -460,6 +460,20 @@ static efi_status_t EFIAPI efi_cout_set_attribute(
|
||||||
return EFI_EXIT(EFI_SUCCESS);
|
return EFI_EXIT(EFI_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* efi_cout_clear_screen() - clear screen
|
||||||
|
*/
|
||||||
|
static void efi_clear_screen(void)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* The Linux console wants both a clear and a home command. The video
|
||||||
|
* uclass does not support <ESC>[H without coordinates, yet.
|
||||||
|
*/
|
||||||
|
printf(ESC "[2J" ESC "[1;1H");
|
||||||
|
efi_con_mode.cursor_column = 0;
|
||||||
|
efi_con_mode.cursor_row = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* efi_cout_clear_screen() - clear screen
|
* efi_cout_clear_screen() - clear screen
|
||||||
*
|
*
|
||||||
|
@ -475,13 +489,7 @@ static efi_status_t EFIAPI efi_cout_clear_screen(
|
||||||
{
|
{
|
||||||
EFI_ENTRY("%p", this);
|
EFI_ENTRY("%p", this);
|
||||||
|
|
||||||
/*
|
efi_clear_screen();
|
||||||
* The Linux console wants both a clear and a home command. The video
|
|
||||||
* uclass does not support <ESC>[H without coordinates, yet.
|
|
||||||
*/
|
|
||||||
printf(ESC "[2J" ESC "[1;1H");
|
|
||||||
efi_con_mode.cursor_column = 0;
|
|
||||||
efi_con_mode.cursor_row = 0;
|
|
||||||
|
|
||||||
return EFI_EXIT(EFI_SUCCESS);
|
return EFI_EXIT(EFI_SUCCESS);
|
||||||
}
|
}
|
||||||
|
@ -510,7 +518,7 @@ static efi_status_t EFIAPI efi_cout_set_mode(
|
||||||
return EFI_EXIT(EFI_UNSUPPORTED);
|
return EFI_EXIT(EFI_UNSUPPORTED);
|
||||||
|
|
||||||
efi_con_mode.mode = mode_number;
|
efi_con_mode.mode = mode_number;
|
||||||
EFI_CALL(efi_cout_clear_screen(this));
|
efi_clear_screen();
|
||||||
|
|
||||||
return EFI_EXIT(EFI_SUCCESS);
|
return EFI_EXIT(EFI_SUCCESS);
|
||||||
}
|
}
|
||||||
|
@ -536,7 +544,7 @@ static efi_status_t EFIAPI efi_cout_reset(
|
||||||
efi_con_mode.attribute = 0x07;
|
efi_con_mode.attribute = 0x07;
|
||||||
printf(ESC "[0;37;40m");
|
printf(ESC "[0;37;40m");
|
||||||
/* Clear screen */
|
/* Clear screen */
|
||||||
EFI_CALL(efi_cout_clear_screen(this));
|
efi_clear_screen();
|
||||||
|
|
||||||
return EFI_EXIT(EFI_SUCCESS);
|
return EFI_EXIT(EFI_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue