瀏覽代碼

efi_loader: fix SetAttribute()

The SetAttribute() service and the Reset() service of the simple text
output protocol must update the attribute value in the mode information.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt 5 年之前
父節點
當前提交
3950f0f856
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/efi_loader/efi_console.c

+ 2 - 0
lib/efi_loader/efi_console.c

@@ -341,6 +341,7 @@ static efi_status_t EFIAPI efi_cout_set_attribute(
 
 	EFI_ENTRY("%p, %lx", this, attribute);
 
+	efi_con_mode.attribute = attribute;
 	if (attribute)
 		printf(ESC"[%u;%u;%um", bold, color[fg].fg, color[bg].bg);
 	else
@@ -384,6 +385,7 @@ static efi_status_t EFIAPI efi_cout_reset(
 	/* Clear screen */
 	EFI_CALL(efi_cout_clear_screen(this));
 	/* Set default colors */
+	efi_con_mode.attribute = 0x07;
 	printf(ESC "[0;37;40m");
 
 	return EFI_EXIT(EFI_SUCCESS);