From cd4f42b0c15613f08f482f40f22eb718ce5c370b Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Thu, 19 Nov 2009 10:39:14 +0000 Subject: [PATCH] 2009-11-19 Robert Millan Patch from Joe Auricchio * commands/minicmd.c (grub_mini_cmd_clear): New function. (GRUB_MOD_INIT(minicmd)): Register grub_mini_cmd_clear(). (GRUB_MOD_FINI(minicmd)): Unregister grub_mini_cmd_clear(). --- ChangeLog | 7 +++++++ commands/minicmd.c | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index 86ef58186..2aaa65eaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-11-19 Robert Millan + + Patch from Joe Auricchio + * commands/minicmd.c (grub_mini_cmd_clear): New function. + (GRUB_MOD_INIT(minicmd)): Register grub_mini_cmd_clear(). + (GRUB_MOD_FINI(minicmd)): Unregister grub_mini_cmd_clear(). + 2009-11-19 Felix Zielcke * Makefile.in (install-local): Add a missing backslash. diff --git a/commands/minicmd.c b/commands/minicmd.c index b31438844..6c9c33a0e 100644 --- a/commands/minicmd.c +++ b/commands/minicmd.c @@ -336,8 +336,19 @@ grub_mini_cmd_exit (struct grub_command *cmd __attribute__ ((unused)), return 0; } +/* clear */ +static grub_err_t +grub_mini_cmd_clear (struct grub_command *cmd __attribute__ ((unused)), + int argc __attribute__ ((unused)), + char *argv[] __attribute__ ((unused))) +{ + grub_cls (); + return 0; +} + static grub_command_t cmd_cat, cmd_help, cmd_root; static grub_command_t cmd_dump, cmd_rmmod, cmd_lsmod, cmd_exit; +static grub_command_t cmd_clear; GRUB_MOD_INIT(minicmd) { @@ -362,6 +373,9 @@ GRUB_MOD_INIT(minicmd) cmd_exit = grub_register_command ("exit", grub_mini_cmd_exit, 0, "exit from GRUB"); + cmd_clear = + grub_register_command ("clear", grub_mini_cmd_clear, + 0, "clear the screen"); } GRUB_MOD_FINI(minicmd) @@ -373,4 +387,5 @@ GRUB_MOD_FINI(minicmd) grub_unregister_command (cmd_rmmod); grub_unregister_command (cmd_lsmod); grub_unregister_command (cmd_exit); + grub_unregister_command (cmd_clear); }