From 5e3535aee7abae828101d48a2a8af3dc57afb058 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 6 Jun 2012 12:20:08 +0200 Subject: [PATCH] * grub-core/term/i386/pc/vga_text.c (screen_write_char): Add missing byte-swap. (screen_read_char): Likewise. (grub_vga_text_cls): Likewise. --- ChangeLog | 7 +++++++ grub-core/term/i386/pc/vga_text.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cd8aaf74c..103805611 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-06-06 Vladimir Serbinenko + + * 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 * grub-core/loader/efi/chainloader.c (copy_file_path): Handle non-ASCII diff --git a/grub-core/term/i386/pc/vga_text.c b/grub-core/term/i386/pc/vga_text.c index 7c2de2024..c934c6898 100644 --- a/grub-core/term/i386/pc/vga_text.c +++ b/grub-core/term/i386/pc/vga_text.c @@ -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); }