* grub-core/term/i386/pc/vga_text.c (screen_write_char): Add missing

byte-swap.
	(screen_read_char): Likewise.
	(grub_vga_text_cls): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-06-06 12:20:08 +02:00
parent c21b17e6e0
commit 5e3535aee7
2 changed files with 10 additions and 3 deletions

View file

@ -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

View 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);
}