Re: GRUB! (Toujours)
On Mon, Feb 26, 2001 at 04:53:47PM +0100, Nicolas Boos wrote:
>
> Bon, et bien me voila renseigné :)
>
> Par contre, n'aurait t'il pas mieux fallu regarder le fallback avant de
> remettre default à 0? Ca semble plus cohérent, non?
Voilà le patch (c'était possible) que je vais soumettre en amont.
A+
--
Thierry LARONDE, Centre de Ressources Informatiques, Archamps - France
http://www.cri74.org
PingOO, serveur de com sur distribution GNU/Linux: http://www.pingoo.org
--- grub/stage2/stage2.c Fri Feb 2 15:18:19 2001
+++ grub/stage2/stage2.c Mon Feb 26 17:25:50 2001
@@ -958,9 +958,12 @@
menu_entries = config_entries + config_len;
/* Check if the default entry is present. Otherwise reset
- DEFAULT_ENTRY. */
- if (default_entry >= num_entries)
- default_entry = 0;
+ it to fallback if fallback is valid, or to DEFAULT_ENTRY
+ if not. */
+ if (default_entry >= num_entries)
+ default_entry = ((fallback_entry < 0)
+ || (fallback_entry >= num_entries)) ?
+ 0 : fallback_entry;
if (is_preset)
close_preset_menu ();
Reply to: