mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 17:19:22 +00:00
If the default entry is wrong, use the fallback entry rather than the first, if possible.
This commit is contained in:
1 parent
4b1637c671
commit
348785cfbc
2 files changed
+14
-1
No files matched your search
@@ -1,3 +1,10 @@
|
|||||||
|
2001-02-28 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
From Thierry Laronde <thierry@cri74.org>:
|
||||||
|
* stage2/stage2.c (cmain): If the default entry is wrong, set it
|
||||||
|
to FALLBACK_ENTRY if FALLBACK_ENTRY is valid, otherwise set it
|
||||||
|
to zero. Suggested by Nicolas Boos <nicolas.boos@wanadoo.fr>.
|
||||||
|
|
||||||
2001-02-28 OKUJI Yoshinori <okuji@gnu.org>
|
2001-02-28 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
* acconfig.h (AUTO_LINUX_MEM_OPT): New entry.
|
* acconfig.h (AUTO_LINUX_MEM_OPT): New entry.
|
||||||
|
|||||||
+7
-1
@@ -966,9 +966,15 @@ cmain (void)
|
|||||||
menu_entries = config_entries + config_len;
|
menu_entries = config_entries + config_len;
|
||||||
|
|
||||||
/* Check if the default entry is present. Otherwise reset
|
/* Check if the default entry is present. Otherwise reset
|
||||||
DEFAULT_ENTRY. */
|
it to fallback if fallback is valid, or to DEFAULT_ENTRY
|
||||||
|
if not. */
|
||||||
if (default_entry >= num_entries)
|
if (default_entry >= num_entries)
|
||||||
|
{
|
||||||
|
if (fallback_entry < 0 || fallback_entry >= num_entries)
|
||||||
default_entry = 0;
|
default_entry = 0;
|
||||||
|
else
|
||||||
|
default_entry = fallback_entry;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_preset)
|
if (is_preset)
|
||||||
close_preset_menu ();
|
close_preset_menu ();
|
||||||
|
|||||||
Reference in new issue
Block a user