merge with mainline
This commit is contained in:
commit
49e38cf475
227 changed files with 8548 additions and 14999 deletions
|
@ -21,7 +21,7 @@
|
|||
#include <grub/parser.h>
|
||||
#include <grub/script_sh.h>
|
||||
|
||||
static grub_err_t
|
||||
grub_err_t
|
||||
grub_normal_parse_line (char *line, grub_reader_getline_t getline)
|
||||
{
|
||||
struct grub_script *parsed_script;
|
||||
|
@ -41,20 +41,33 @@ grub_normal_parse_line (char *line, grub_reader_getline_t getline)
|
|||
return grub_errno;
|
||||
}
|
||||
|
||||
static struct grub_parser grub_sh_parser =
|
||||
{
|
||||
.name = "grub",
|
||||
.parse_line = grub_normal_parse_line
|
||||
};
|
||||
static grub_command_t cmd_break;
|
||||
static grub_command_t cmd_continue;
|
||||
static grub_command_t cmd_shift;
|
||||
|
||||
GRUB_MOD_INIT(sh)
|
||||
void
|
||||
grub_script_init (void)
|
||||
{
|
||||
grub_parser_register ("grub", &grub_sh_parser);
|
||||
grub_register_command ("shift", grub_script_cmd_shift,
|
||||
N_("[n]"), N_("Shift positional parameters."));
|
||||
cmd_break = grub_register_command ("break", grub_script_break,
|
||||
N_("[n]"), N_("Exit from loops"));
|
||||
cmd_continue = grub_register_command ("continue", grub_script_break,
|
||||
N_("[n]"), N_("Continue loops"));
|
||||
cmd_shift = grub_register_command ("shift", grub_script_shift,
|
||||
N_("[n]"), N_("Shift positional parameters."));
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(sh)
|
||||
void
|
||||
grub_script_fini (void)
|
||||
{
|
||||
grub_parser_unregister (&grub_sh_parser);
|
||||
if (cmd_break)
|
||||
grub_unregister_command (cmd_break);
|
||||
cmd_break = 0;
|
||||
|
||||
if (cmd_continue)
|
||||
grub_unregister_command (cmd_continue);
|
||||
cmd_continue = 0;
|
||||
|
||||
if (cmd_shift)
|
||||
grub_unregister_command (cmd_shift);
|
||||
cmd_shift = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue