]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Clear out 0x80 color bit on EFI.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 1 Oct 2010 14:54:38 +0000 (16:54 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 1 Oct 2010 14:54:38 +0000 (16:54 +0200)
Tested by: decoder
Reported by: decoder and meta tech.

* grub-core/term/efi/console.c (grub_console_standard_color): Removed.
(grub_console_setcolorstate): Clear out 0x80 bit.
Use GRUB_TERM_DEFAULT_STANDARD_COLOR.
(grub_console_output): Use GRUB_TERM_DEFAULT_NORMAL_COLOR.
Use GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR.

ChangeLog
grub-core/term/efi/console.c

index 3ed524a4c524f57bec113bd8c4d502e2df65f1ad..9b36f34262150d49d8a8419a4ca2a7fe5651d9a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-01  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Clear out 0x80 color bit on EFI.
+       Tested by: decoder
+       Reported by: decoder and meta tech.
+
+       * grub-core/term/efi/console.c (grub_console_standard_color): Removed.
+       (grub_console_setcolorstate): Clear out 0x80 bit.
+       Use GRUB_TERM_DEFAULT_STANDARD_COLOR.
+       (grub_console_output): Use GRUB_TERM_DEFAULT_NORMAL_COLOR.
+       Use GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR.
+
 2010-10-01  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/loader/i386/linux.c (DEFAULT_VIDEO_MODE) [GRUB_MACHINE_EFI]:
index 4872a9a3f70b60d8bf78fc22d48b6d7346ab57d9..8fd89b0932a40fe510a64715ccd666949b5fb5fd 100644 (file)
 #include <grub/efi/api.h>
 #include <grub/efi/console.h>
 
-static const grub_uint8_t
-grub_console_standard_color = GRUB_EFI_TEXT_ATTR (GRUB_EFI_YELLOW,
-                                                 GRUB_EFI_BACKGROUND_BLACK);
-
 static grub_uint32_t
 map_char (grub_uint32_t c)
 {
@@ -208,13 +204,14 @@ grub_console_setcolorstate (struct grub_term_output *term,
 
   switch (state) {
     case GRUB_TERM_COLOR_STANDARD:
-      efi_call_2 (o->set_attributes, o, grub_console_standard_color);
+      efi_call_2 (o->set_attributes, o, GRUB_TERM_DEFAULT_STANDARD_COLOR
+                 & 0x7f);
       break;
     case GRUB_TERM_COLOR_NORMAL:
-      efi_call_2 (o->set_attributes, o, term->normal_color);
+      efi_call_2 (o->set_attributes, o, term->normal_color & 0x7f);
       break;
     case GRUB_TERM_COLOR_HIGHLIGHT:
-      efi_call_2 (o->set_attributes, o, term->highlight_color);
+      efi_call_2 (o->set_attributes, o, term->highlight_color & 0x7f);
       break;
     default:
       break;
@@ -266,10 +263,8 @@ static struct grub_term_output grub_console_term_output =
     .cls = grub_console_cls,
     .setcolorstate = grub_console_setcolorstate,
     .setcursor = grub_console_setcursor,
-    .normal_color = GRUB_EFI_TEXT_ATTR (GRUB_EFI_LIGHTGRAY,
-                                       GRUB_EFI_BACKGROUND_BLACK),
-    .highlight_color = GRUB_EFI_TEXT_ATTR (GRUB_EFI_BLACK,
-                                          GRUB_EFI_BACKGROUND_LIGHTGRAY),
+    .normal_color = GRUB_TERM_DEFAULT_NORMAL_COLOR,
+    .highlight_color = GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR,
     .flags = GRUB_TERM_CODE_TYPE_VISUAL_GLYPHS
   };