Make the `source' command slightly faster.

* normal/main.c (grub_normal_execute): Don't re-read list files when
nested.
This commit is contained in:
Colin Watson 2010-06-26 10:46:54 +01:00
parent e9b29642bd
commit 3fa0648724
2 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2010-06-26 Colin Watson <cjwatson@ubuntu.com>
Make the `source' command slightly faster.
* normal/main.c (grub_normal_execute): Don't re-read list files when
nested.
2010-06-23 Colin Watson <cjwatson@ubuntu.com>
* loader/i386/multiboot_mbi.c (retrieve_video_parameters): Set red

View File

@ -464,11 +464,15 @@ void
grub_normal_execute (const char *config, int nested, int batch)
{
grub_menu_t menu = 0;
const char *prefix = grub_env_get ("prefix");
const char *prefix;
read_lists (prefix);
grub_register_variable_hook ("prefix", NULL, read_lists_hook);
grub_command_execute ("parser.grub", 0, 0);
if (! nested)
{
prefix = grub_env_get ("prefix");
read_lists (prefix);
grub_register_variable_hook ("prefix", NULL, read_lists_hook);
grub_command_execute ("parser.grub", 0, 0);
}
if (config)
{