2010-01-07 Robert Millan <rmh.grub@aybabtu.com>
Merge prefix-redefinition-fix branch. * normal/autofs.c (read_fs_list): Make function capable of being run multiple times, gracefuly replacing the previous data structures. * normal/dyncmd.c (read_command_list): Likewise. * normal/handler.c (read_handler_list): Likewise. * normal/main.c (read_lists): New function. Calls all the list reading functions. (grub_normal_execute): Use read_lists() instead of calling all list reading functions explicitly. Register read_lists() as a variable hook attached to ${prefix}.
This commit is contained in:
commit
e2e936b2f2
5 changed files with 65 additions and 22 deletions
|
@ -418,6 +418,17 @@ grub_normal_init_page (void)
|
|||
|
||||
static int reader_nested;
|
||||
|
||||
static char *
|
||||
read_lists (struct grub_env_var *var __attribute__ ((unused)),
|
||||
const char *val)
|
||||
{
|
||||
read_command_list ();
|
||||
read_fs_list ();
|
||||
read_handler_list ();
|
||||
read_crypto_list ();
|
||||
return val ? grub_strdup (val) : NULL;
|
||||
}
|
||||
|
||||
/* Read the config file CONFIG and execute the menu interface or
|
||||
the command line interface if BATCH is false. */
|
||||
void
|
||||
|
@ -425,10 +436,8 @@ grub_normal_execute (const char *config, int nested, int batch)
|
|||
{
|
||||
grub_menu_t menu = 0;
|
||||
|
||||
read_command_list ();
|
||||
read_fs_list ();
|
||||
read_handler_list ();
|
||||
read_crypto_list ();
|
||||
read_lists (NULL, NULL);
|
||||
grub_register_variable_hook ("prefix", NULL, read_lists);
|
||||
grub_command_execute ("parser.grub", 0, 0);
|
||||
|
||||
reader_nested = nested;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue