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

192 lines
4.6 KiB
C
Raw Normal View History

/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
2008-11-12 15:02:17 +00:00
#include <grub/dl.h>
#include <grub/i386/vga_common.h>
#include <grub/cpu/io.h>
#include <grub/types.h>
2010-05-17 00:25:37 +00:00
#include <grub/vga.h>
Remove grub_{modname}_init and grub_{modname}_fini. They should never be used directly if it's really a module and GRUB_MOD_INIT shouldn't be used on non-modules. * grub-core/commands/boot.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_fini. * grub-core/commands/keylayouts.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_fini. * grub-core/font/font_cmd.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_font_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_font_fini. * grub-core/kern/mips/loongson/init.c: Replace explicit protos with includes. (grub_machine_init): Remove empty inits. * grub-core/kern/mips/qemu_mips/init.c: Replace explicit protos with includes. (grub_machine_init): Remove empty inits. * grub-core/term/arc/console.c: Remove explicit proto. * grub-core/term/at_keyboard.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_fini. * grub-core/term/gfxterm.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_fini. * grub-core/term/i386/pc/vga_text.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_fini. * grub-core/term/ieee1275/console.c: Remove explicit proto. * grub-core/term/serial.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_serial_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_serial_fini. * grub-core/term/terminfo.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_fini. * grub-core/video/bitmap.c (GRUB_MOD_INIT): Removed. (GRUB_MOD_FINI): Likewise. * grub-core/video/radeon_fuloong2e.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_radeon_fuloong2e_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_radeon_fuloong2e_fini. * grub-core/video/sis315pro.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_sis315pro_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_sis315pro_fini. * grub-core/video/sm712.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_sm712_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_sm712_fini. * include/grub/at_keyboard.h (grub_at_keyboard_init): New proto. (grub_at_keyboard_fini): Likewise. * include/grub/dl.h (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_init. (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_fini. * include/grub/keyboard_layouts.h (grub_keylayouts_init) [!EMU]: New proto. (grub_keylayouts_fini) [!EMU]: Likewise. * include/grub/serial.h (grub_serial_init) [!EMU]: New proto. (grub_serial_fini) [!EMU]: Likewise. * include/grub/terminfo.h (grub_terminfo_init) [!EMU]: New proto. (grub_terminfo_fini) [!EMU]: Likewise. * include/grub/video.h (grub_font_init) [!EMU]: New proto. (grub_font_fini) [!EMU]: Likewise. (grub_gfxterm_init) [!EMU]: Likewise. (grub_gfxterm_fini) [!EMU]: Likewise. (grub_video_sm712_init) [!EMU]: Likewise. (grub_video_sm712_fini) [!EMU]: Likewise. (grub_video_sis315pro_init) [!EMU]: Likewise. (grub_video_sis315pro_fini) [!EMU]: Likewise. (grub_video_radeon_fuloong2e_init) [!EMU]: Likewise. (grub_video_radeon_fuloong2e_fini) [!EMU]: Likewise.
2012-02-26 23:28:45 +00:00
#if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU) || defined (GRUB_MACHINE_MIPS_QEMU_MIPS)
#include <grub/machine/console.h>
#endif
GRUB_MOD_LICENSE ("GPLv3+");
#define COLS 80
#define ROWS 25
static int grub_curr_x, grub_curr_y;
#ifdef __mips__
#define VGA_TEXT_SCREEN ((grub_uint16_t *) 0xb00b8000)
#else
#define VGA_TEXT_SCREEN ((grub_uint16_t *) 0xb8000)
#endif
static void
screen_write_char (int x, int y, short c)
{
VGA_TEXT_SCREEN[y * COLS + x] = c;
}
static short
screen_read_char (int x, int y)
{
return VGA_TEXT_SCREEN[y * COLS + x];
}
static void
update_cursor (void)
{
unsigned int pos = grub_curr_y * COLS + grub_curr_x;
2010-05-17 00:25:37 +00:00
grub_vga_cr_write (pos >> 8, GRUB_VGA_CR_CURSOR_ADDR_HIGH);
grub_vga_cr_write (pos & 0xFF, GRUB_VGA_CR_CURSOR_ADDR_LOW);
}
static void
inc_y (void)
{
grub_curr_x = 0;
if (grub_curr_y < ROWS - 1)
grub_curr_y++;
else
{
int x, y;
2010-06-21 00:08:48 +00:00
for (y = 0; y < ROWS - 1; y++)
for (x = 0; x < COLS; x++)
screen_write_char (x, y, screen_read_char (x, y + 1));
2010-06-21 00:08:48 +00:00
for (x = 0; x < COLS; x++)
screen_write_char (x, ROWS - 1, ' ' | (grub_console_cur_color << 8));
}
}
static void
inc_x (void)
{
if (grub_curr_x >= COLS - 1)
inc_y ();
else
grub_curr_x++;
}
static void
2010-05-07 00:30:44 +00:00
grub_vga_text_putchar (struct grub_term_output *term __attribute__ ((unused)),
const struct grub_unicode_glyph *c)
{
switch (c->base)
{
case '\b':
if (grub_curr_x != 0)
screen_write_char (grub_curr_x--, grub_curr_y, ' ');
break;
case '\n':
inc_y ();
break;
case '\r':
grub_curr_x = 0;
break;
default:
screen_write_char (grub_curr_x, grub_curr_y,
c->base | (grub_console_cur_color << 8));
inc_x ();
}
update_cursor ();
}
2008-11-12 15:02:17 +00:00
static grub_uint16_t
2010-05-07 00:30:44 +00:00
grub_vga_text_getxy (struct grub_term_output *term __attribute__ ((unused)))
{
return (grub_curr_x << 8) | grub_curr_y;
}
2008-11-12 15:02:17 +00:00
static void
2010-05-07 00:30:44 +00:00
grub_vga_text_gotoxy (struct grub_term_output *term __attribute__ ((unused)),
grub_uint8_t x, grub_uint8_t y)
{
grub_curr_x = x;
grub_curr_y = y;
update_cursor ();
}
2008-11-12 15:02:17 +00:00
static void
2010-05-07 00:30:44 +00:00
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);
2010-05-07 00:30:44 +00:00
grub_vga_text_gotoxy (term, 0, 0);
}
2008-11-12 15:02:17 +00:00
static void
2010-05-07 00:30:44 +00:00
grub_vga_text_setcursor (struct grub_term_output *term __attribute__ ((unused)),
int on)
{
grub_uint8_t old;
old = grub_vga_cr_read (GRUB_VGA_CR_CURSOR_START);
if (on)
grub_vga_cr_write (old & ~GRUB_VGA_CR_CURSOR_START_DISABLE,
GRUB_VGA_CR_CURSOR_START);
else
grub_vga_cr_write (old | GRUB_VGA_CR_CURSOR_START_DISABLE,
GRUB_VGA_CR_CURSOR_START);
}
2008-11-12 15:02:17 +00:00
static grub_err_t
2010-05-07 00:30:44 +00:00
grub_vga_text_init_fini (struct grub_term_output *term)
{
2010-05-07 00:30:44 +00:00
grub_vga_text_cls (term);
return 0;
}
2008-11-12 15:02:17 +00:00
static struct grub_term_output grub_vga_text_term =
{
.name = "vga_text",
.init = grub_vga_text_init_fini,
.fini = grub_vga_text_init_fini,
.putchar = grub_vga_text_putchar,
2008-11-12 15:02:17 +00:00
.getwh = grub_console_getwh,
.getxy = grub_vga_text_getxy,
.gotoxy = grub_vga_text_gotoxy,
.cls = grub_vga_text_cls,
.setcolorstate = grub_console_setcolorstate,
.setcursor = grub_vga_text_setcursor,
2010-05-09 11:26:52 +00:00
.flags = GRUB_TERM_CODE_TYPE_CP437,
2010-05-07 23:06:22 +00:00
.normal_color = GRUB_TERM_DEFAULT_NORMAL_COLOR,
.highlight_color = GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR,
2008-11-12 15:02:17 +00:00
};
Remove grub_{modname}_init and grub_{modname}_fini. They should never be used directly if it's really a module and GRUB_MOD_INIT shouldn't be used on non-modules. * grub-core/commands/boot.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_fini. * grub-core/commands/keylayouts.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_fini. * grub-core/font/font_cmd.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_font_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_font_fini. * grub-core/kern/mips/loongson/init.c: Replace explicit protos with includes. (grub_machine_init): Remove empty inits. * grub-core/kern/mips/qemu_mips/init.c: Replace explicit protos with includes. (grub_machine_init): Remove empty inits. * grub-core/term/arc/console.c: Remove explicit proto. * grub-core/term/at_keyboard.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_fini. * grub-core/term/gfxterm.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_fini. * grub-core/term/i386/pc/vga_text.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_fini. * grub-core/term/ieee1275/console.c: Remove explicit proto. * grub-core/term/serial.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_serial_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_serial_fini. * grub-core/term/terminfo.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_fini. * grub-core/video/bitmap.c (GRUB_MOD_INIT): Removed. (GRUB_MOD_FINI): Likewise. * grub-core/video/radeon_fuloong2e.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_radeon_fuloong2e_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_radeon_fuloong2e_fini. * grub-core/video/sis315pro.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_sis315pro_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_sis315pro_fini. * grub-core/video/sm712.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_sm712_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_sm712_fini. * include/grub/at_keyboard.h (grub_at_keyboard_init): New proto. (grub_at_keyboard_fini): Likewise. * include/grub/dl.h (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_init. (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_fini. * include/grub/keyboard_layouts.h (grub_keylayouts_init) [!EMU]: New proto. (grub_keylayouts_fini) [!EMU]: Likewise. * include/grub/serial.h (grub_serial_init) [!EMU]: New proto. (grub_serial_fini) [!EMU]: Likewise. * include/grub/terminfo.h (grub_terminfo_init) [!EMU]: New proto. (grub_terminfo_fini) [!EMU]: Likewise. * include/grub/video.h (grub_font_init) [!EMU]: New proto. (grub_font_fini) [!EMU]: Likewise. (grub_gfxterm_init) [!EMU]: Likewise. (grub_gfxterm_fini) [!EMU]: Likewise. (grub_video_sm712_init) [!EMU]: Likewise. (grub_video_sm712_fini) [!EMU]: Likewise. (grub_video_sis315pro_init) [!EMU]: Likewise. (grub_video_sis315pro_fini) [!EMU]: Likewise. (grub_video_radeon_fuloong2e_init) [!EMU]: Likewise. (grub_video_radeon_fuloong2e_fini) [!EMU]: Likewise.
2012-02-26 23:28:45 +00:00
#if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU) || defined (GRUB_MACHINE_MIPS_QEMU_MIPS)
void grub_vga_text_init (void)
#else
2008-11-12 15:02:17 +00:00
GRUB_MOD_INIT(vga_text)
Remove grub_{modname}_init and grub_{modname}_fini. They should never be used directly if it's really a module and GRUB_MOD_INIT shouldn't be used on non-modules. * grub-core/commands/boot.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_fini. * grub-core/commands/keylayouts.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_fini. * grub-core/font/font_cmd.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_font_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_font_fini. * grub-core/kern/mips/loongson/init.c: Replace explicit protos with includes. (grub_machine_init): Remove empty inits. * grub-core/kern/mips/qemu_mips/init.c: Replace explicit protos with includes. (grub_machine_init): Remove empty inits. * grub-core/term/arc/console.c: Remove explicit proto. * grub-core/term/at_keyboard.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_fini. * grub-core/term/gfxterm.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_fini. * grub-core/term/i386/pc/vga_text.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_fini. * grub-core/term/ieee1275/console.c: Remove explicit proto. * grub-core/term/serial.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_serial_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_serial_fini. * grub-core/term/terminfo.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_fini. * grub-core/video/bitmap.c (GRUB_MOD_INIT): Removed. (GRUB_MOD_FINI): Likewise. * grub-core/video/radeon_fuloong2e.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_radeon_fuloong2e_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_radeon_fuloong2e_fini. * grub-core/video/sis315pro.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_sis315pro_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_sis315pro_fini. * grub-core/video/sm712.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_sm712_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_sm712_fini. * include/grub/at_keyboard.h (grub_at_keyboard_init): New proto. (grub_at_keyboard_fini): Likewise. * include/grub/dl.h (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_init. (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_fini. * include/grub/keyboard_layouts.h (grub_keylayouts_init) [!EMU]: New proto. (grub_keylayouts_fini) [!EMU]: Likewise. * include/grub/serial.h (grub_serial_init) [!EMU]: New proto. (grub_serial_fini) [!EMU]: Likewise. * include/grub/terminfo.h (grub_terminfo_init) [!EMU]: New proto. (grub_terminfo_fini) [!EMU]: Likewise. * include/grub/video.h (grub_font_init) [!EMU]: New proto. (grub_font_fini) [!EMU]: Likewise. (grub_gfxterm_init) [!EMU]: Likewise. (grub_gfxterm_fini) [!EMU]: Likewise. (grub_video_sm712_init) [!EMU]: Likewise. (grub_video_sm712_fini) [!EMU]: Likewise. (grub_video_sis315pro_init) [!EMU]: Likewise. (grub_video_sis315pro_fini) [!EMU]: Likewise. (grub_video_radeon_fuloong2e_init) [!EMU]: Likewise. (grub_video_radeon_fuloong2e_fini) [!EMU]: Likewise.
2012-02-26 23:28:45 +00:00
#endif
2008-11-12 15:02:17 +00:00
{
2009-04-14 18:12:14 +00:00
grub_term_register_output ("vga_text", &grub_vga_text_term);
2008-11-12 15:02:17 +00:00
}
Remove grub_{modname}_init and grub_{modname}_fini. They should never be used directly if it's really a module and GRUB_MOD_INIT shouldn't be used on non-modules. * grub-core/commands/boot.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_fini. * grub-core/commands/keylayouts.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_fini. * grub-core/font/font_cmd.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_font_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_font_fini. * grub-core/kern/mips/loongson/init.c: Replace explicit protos with includes. (grub_machine_init): Remove empty inits. * grub-core/kern/mips/qemu_mips/init.c: Replace explicit protos with includes. (grub_machine_init): Remove empty inits. * grub-core/term/arc/console.c: Remove explicit proto. * grub-core/term/at_keyboard.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_fini. * grub-core/term/gfxterm.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_fini. * grub-core/term/i386/pc/vga_text.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_fini. * grub-core/term/ieee1275/console.c: Remove explicit proto. * grub-core/term/serial.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_serial_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_serial_fini. * grub-core/term/terminfo.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_fini. * grub-core/video/bitmap.c (GRUB_MOD_INIT): Removed. (GRUB_MOD_FINI): Likewise. * grub-core/video/radeon_fuloong2e.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_radeon_fuloong2e_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_radeon_fuloong2e_fini. * grub-core/video/sis315pro.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_sis315pro_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_sis315pro_fini. * grub-core/video/sm712.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_sm712_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_sm712_fini. * include/grub/at_keyboard.h (grub_at_keyboard_init): New proto. (grub_at_keyboard_fini): Likewise. * include/grub/dl.h (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_init. (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_fini. * include/grub/keyboard_layouts.h (grub_keylayouts_init) [!EMU]: New proto. (grub_keylayouts_fini) [!EMU]: Likewise. * include/grub/serial.h (grub_serial_init) [!EMU]: New proto. (grub_serial_fini) [!EMU]: Likewise. * include/grub/terminfo.h (grub_terminfo_init) [!EMU]: New proto. (grub_terminfo_fini) [!EMU]: Likewise. * include/grub/video.h (grub_font_init) [!EMU]: New proto. (grub_font_fini) [!EMU]: Likewise. (grub_gfxterm_init) [!EMU]: Likewise. (grub_gfxterm_fini) [!EMU]: Likewise. (grub_video_sm712_init) [!EMU]: Likewise. (grub_video_sm712_fini) [!EMU]: Likewise. (grub_video_sis315pro_init) [!EMU]: Likewise. (grub_video_sis315pro_fini) [!EMU]: Likewise. (grub_video_radeon_fuloong2e_init) [!EMU]: Likewise. (grub_video_radeon_fuloong2e_fini) [!EMU]: Likewise.
2012-02-26 23:28:45 +00:00
#if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU) || defined (GRUB_MACHINE_MIPS_QEMU_MIPS)
void grub_vga_text_fini (void)
#else
2008-11-12 15:02:17 +00:00
GRUB_MOD_FINI(vga_text)
Remove grub_{modname}_init and grub_{modname}_fini. They should never be used directly if it's really a module and GRUB_MOD_INIT shouldn't be used on non-modules. * grub-core/commands/boot.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_fini. * grub-core/commands/keylayouts.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_fini. * grub-core/font/font_cmd.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_font_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_font_fini. * grub-core/kern/mips/loongson/init.c: Replace explicit protos with includes. (grub_machine_init): Remove empty inits. * grub-core/kern/mips/qemu_mips/init.c: Replace explicit protos with includes. (grub_machine_init): Remove empty inits. * grub-core/term/arc/console.c: Remove explicit proto. * grub-core/term/at_keyboard.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_fini. * grub-core/term/gfxterm.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_fini. * grub-core/term/i386/pc/vga_text.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_fini. * grub-core/term/ieee1275/console.c: Remove explicit proto. * grub-core/term/serial.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_serial_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_serial_fini. * grub-core/term/terminfo.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_init. (GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_fini. * grub-core/video/bitmap.c (GRUB_MOD_INIT): Removed. (GRUB_MOD_FINI): Likewise. * grub-core/video/radeon_fuloong2e.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_radeon_fuloong2e_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_radeon_fuloong2e_fini. * grub-core/video/sis315pro.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_sis315pro_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_sis315pro_fini. * grub-core/video/sm712.c (GRUB_MOD_INIT) [LOONGSON]: Rename to grub_video_sm712_init. (GRUB_MOD_FINI) [LOONGSON]: Rename to grub_video_sm712_fini. * include/grub/at_keyboard.h (grub_at_keyboard_init): New proto. (grub_at_keyboard_fini): Likewise. * include/grub/dl.h (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_init. (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_fini. * include/grub/keyboard_layouts.h (grub_keylayouts_init) [!EMU]: New proto. (grub_keylayouts_fini) [!EMU]: Likewise. * include/grub/serial.h (grub_serial_init) [!EMU]: New proto. (grub_serial_fini) [!EMU]: Likewise. * include/grub/terminfo.h (grub_terminfo_init) [!EMU]: New proto. (grub_terminfo_fini) [!EMU]: Likewise. * include/grub/video.h (grub_font_init) [!EMU]: New proto. (grub_font_fini) [!EMU]: Likewise. (grub_gfxterm_init) [!EMU]: Likewise. (grub_gfxterm_fini) [!EMU]: Likewise. (grub_video_sm712_init) [!EMU]: Likewise. (grub_video_sm712_fini) [!EMU]: Likewise. (grub_video_sis315pro_init) [!EMU]: Likewise. (grub_video_sis315pro_fini) [!EMU]: Likewise. (grub_video_radeon_fuloong2e_init) [!EMU]: Likewise. (grub_video_radeon_fuloong2e_fini) [!EMU]: Likewise.
2012-02-26 23:28:45 +00:00
#endif
2008-11-12 15:02:17 +00:00
{
grub_term_unregister_output (&grub_vga_text_term);
}