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
exceed 255.
*(new_heap++) = 0;
if (config_entries)
- run_menu (heap, NULL, new_num_entries, new_heap, 0);
+ {
+ current_entryno = first_entry + entryno;
+ run_menu (heap, NULL, new_num_entries, new_heap, 0);
+ }
else
{
cls ();
cur_entry = get_entry (config_entries, first_entry + entryno, 1);
/* Set CURRENT_ENTRYNO for the command "savedefault". */
- current_entryno = first_entry + entryno;
+ if (config_entries)
+ current_entryno = first_entry + entryno;
if (run_script (cur_entry, heap))
{