]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/term/i386/pc/vga_text.c (screen_write_char): Add missing
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 6 Jun 2012 10:20:08 +0000 (12:20 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 6 Jun 2012 10:20:08 +0000 (12:20 +0200)
byte-swap.
(screen_read_char): Likewise.
(grub_vga_text_cls): Likewise.

ChangeLog
grub-core/term/i386/pc/vga_text.c

index cd8aaf74c0933eb63b62832c4555048adcbc74c9..1038056113fca505cf612baea5e284fa20073a69 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-06-06  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/term/i386/pc/vga_text.c (screen_write_char): Add missing
+       byte-swap.
+       (screen_read_char): Likewise.
+       (grub_vga_text_cls): Likewise.
+
 2012-06-06  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/loader/efi/chainloader.c (copy_file_path): Handle non-ASCII
index 7c2de2024a71501e8700eb25201a00136bce04d6..c934c6898ff9299c1b20a51efbb7fd99716dc83c 100644 (file)
@@ -42,13 +42,13 @@ static int grub_curr_x, grub_curr_y;
 static void
 screen_write_char (int x, int y, short c)
 {
-  VGA_TEXT_SCREEN[y * COLS + x] = c;
+  VGA_TEXT_SCREEN[y * COLS + x] = grub_cpu_to_le16 (c);
 }
 
 static short
 screen_read_char (int x, int y)
 {
-  return VGA_TEXT_SCREEN[y * COLS + x];
+  return grub_le_to_cpu16 (VGA_TEXT_SCREEN[y * COLS + x]);
 }
 
 static void
@@ -130,7 +130,7 @@ grub_vga_text_cls (struct grub_term_output *term)
 {
   int i;
   for (i = 0; i < ROWS * COLS; i++)
-    VGA_TEXT_SCREEN[i] = ' ' | (grub_console_cur_color << 8);
+    VGA_TEXT_SCREEN[i] = grub_cpu_to_le16 (' ' | (grub_console_cur_color << 8));
   grub_vga_text_gotoxy (term, 0, 0);
 }