merge mainline into asprintf
This commit is contained in:
commit
2d49abe9e7
342 changed files with 14569 additions and 4699 deletions
|
@ -51,12 +51,6 @@ void
|
|||
read_fs_list (void)
|
||||
{
|
||||
const char *prefix;
|
||||
static int first_time = 1;
|
||||
|
||||
/* Make sure that this function does not get executed twice. */
|
||||
if (! first_time)
|
||||
return;
|
||||
first_time = 0;
|
||||
|
||||
prefix = grub_env_get ("prefix");
|
||||
if (prefix)
|
||||
|
@ -67,10 +61,25 @@ read_fs_list (void)
|
|||
if (filename)
|
||||
{
|
||||
grub_file_t file;
|
||||
grub_fs_autoload_hook_t tmp_autoload_hook;
|
||||
|
||||
/* This rules out the possibility that read_fs_list() is invoked
|
||||
recursively when we call grub_file_open() below. */
|
||||
tmp_autoload_hook = grub_fs_autoload_hook;
|
||||
grub_fs_autoload_hook = NULL;
|
||||
|
||||
file = grub_file_open (filename);
|
||||
if (file)
|
||||
{
|
||||
/* Override previous fs.lst. */
|
||||
while (fs_module_list)
|
||||
{
|
||||
grub_named_list_t tmp;
|
||||
tmp = fs_module_list->next;
|
||||
grub_free (fs_module_list);
|
||||
fs_module_list = tmp;
|
||||
}
|
||||
|
||||
while (1)
|
||||
{
|
||||
char *buf;
|
||||
|
@ -112,6 +121,7 @@ read_fs_list (void)
|
|||
}
|
||||
|
||||
grub_file_close (file);
|
||||
grub_fs_autoload_hook = tmp_autoload_hook;
|
||||
}
|
||||
|
||||
grub_free (filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue