2010-01-07 Robert Millan <rmh.grub@aybabtu.com>
2010-01-07 Vladimir Serbinenko <phcoder@gmail.com> Fix breakage introduced with previous commit. * normal/dyncmd.c (read_command_list): Avoid unregistering kernel commands. * normal/handler.c (read_handler_list): Revert part of previous commit affecting this file. * normal/main.c (read_lists): Move read_handler_list() call back to ... (grub_normal_execute): ... here.
This commit is contained in:
commit
53108d92ba
4 changed files with 32 additions and 16 deletions
|
@ -79,14 +79,22 @@ read_command_list (void)
|
|||
if (file)
|
||||
{
|
||||
char *buf = NULL;
|
||||
grub_command_t ptr, last = 0, next;
|
||||
|
||||
/* Override previous commands.lst. */
|
||||
while (grub_command_list)
|
||||
for (ptr = grub_command_list; ptr; ptr = next)
|
||||
{
|
||||
grub_command_t tmp;
|
||||
tmp = grub_command_list->next;
|
||||
grub_free (grub_command_list);
|
||||
grub_command_list = tmp;
|
||||
next = ptr->next;
|
||||
if (ptr->func == grub_dyncmd_dispatcher)
|
||||
{
|
||||
if (last)
|
||||
last->next = ptr->next;
|
||||
else
|
||||
grub_command_list = ptr->next;
|
||||
grub_free (ptr);
|
||||
}
|
||||
else
|
||||
last = ptr;
|
||||
}
|
||||
|
||||
for (;; grub_free (buf))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue