* stage2/stage2.c (run_menu): Fix "savedefault" to save only top

level menu positions.  Remember current position when calling a
submenu.  Don't recalculate it when booting from a submenu.
This commit is contained in:
proski committed 2006-05-05 22:06:31 +00:00
1 parent b8aa16f505
commit 7a1b51024a
2 files changed
+8

No files matched your search

+4
View File
@@ -1,5 +1,9 @@
2006-05-02 Pavel Roskin <proski@gnu.org> 2006-05-02 Pavel Roskin <proski@gnu.org>
* stage2/stage2.c (run_menu): Fix "savedefault" to save only top
level menu positions. Remember current position when calling a
submenu. Don't recalculate it when booting from a submenu.
* grub/main.c (main): Make sure the boot drive number doesn't * grub/main.c (main): Make sure the boot drive number doesn't
exceed 255. exceed 255.
+4
View File
@@ -651,7 +651,10 @@ restart:
*(new_heap++) = 0; *(new_heap++) = 0;
if (config_entries) if (config_entries)
{
current_entryno = first_entry + entryno;
run_menu (heap, NULL, new_num_entries, new_heap, 0); run_menu (heap, NULL, new_num_entries, new_heap, 0);
}
else else
{ {
cls (); cls ();
@@ -727,6 +730,7 @@ restart:
cur_entry = get_entry (config_entries, first_entry + entryno, 1); cur_entry = get_entry (config_entries, first_entry + entryno, 1);
/* Set CURRENT_ENTRYNO for the command "savedefault". */ /* Set CURRENT_ENTRYNO for the command "savedefault". */
if (config_entries)
current_entryno = first_entry + entryno; current_entryno = first_entry + entryno;
if (run_script (cur_entry, heap)) if (run_script (cur_entry, heap))