* normal/autofs.c (read_fs_list): New parameter 'prefix'.
All users updated. * normal/crypto.c (read_crypto_list): Likewise. * normal/dyncmd.c (read_command_list): Likewise. * normal/term.c (read_terminal_list): Likewise. * normal/main.c (read_lists): Use explicit prefix. (read_lists_hook): Use read_lists. (grub_normal_execute): Likewise.
This commit is contained in:
parent
4777971126
commit
027de555e2
7 changed files with 35 additions and 27 deletions
|
@ -434,14 +434,20 @@ grub_normal_init_page (struct grub_term_output *term)
|
|||
grub_free (unicode_msg);
|
||||
}
|
||||
|
||||
static char *
|
||||
read_lists (struct grub_env_var *var __attribute__ ((unused)),
|
||||
const char *val)
|
||||
static void
|
||||
read_lists (const char *val)
|
||||
{
|
||||
read_command_list ();
|
||||
read_fs_list ();
|
||||
read_crypto_list ();
|
||||
read_terminal_list ();
|
||||
read_command_list (val);
|
||||
read_fs_list (val);
|
||||
read_crypto_list (val);
|
||||
read_terminal_list (val);
|
||||
}
|
||||
|
||||
static char *
|
||||
read_lists_hook (struct grub_env_var *var __attribute__ ((unused)),
|
||||
const char *val)
|
||||
{
|
||||
read_lists (val);
|
||||
return val ? grub_strdup (val) : NULL;
|
||||
}
|
||||
|
||||
|
@ -451,10 +457,11 @@ void
|
|||
grub_normal_execute (const char *config, int nested, int batch)
|
||||
{
|
||||
grub_menu_t menu = 0;
|
||||
const char *prefix = grub_env_get ("prefix");
|
||||
|
||||
read_lists (NULL, NULL);
|
||||
read_lists (prefix);
|
||||
read_handler_list ();
|
||||
grub_register_variable_hook ("prefix", NULL, read_lists);
|
||||
grub_register_variable_hook ("prefix", NULL, read_lists_hook);
|
||||
grub_command_execute ("parser.grub", 0, 0);
|
||||
|
||||
if (config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue