1 --- grub-0.96/stage2/builtins.c.orig 2004-06-20 15:33:04.000000000 +0200
2 +++ grub-0.96/stage2/builtins.c 2005-09-02 14:38:53.000000000 +0200
4 default_func (char *arg, int flags)
6 #ifndef SUPPORT_DISKLESS
7 - if (grub_strcmp (arg, "saved") == 0)
8 + if (grub_strcmp (arg, "saved") == 0 || (saved_entryno & 0x4000))
10 - default_entry = saved_entryno;
12 + default_entry = saved_entryno & 0x3fff;
15 #endif /* SUPPORT_DISKLESS */
17 if (! safe_parse_maxint (&arg, &default_entry))
22 +#ifndef SUPPORT_DISKLESS
23 +static int savedefault_func (char *arg, int flags);
24 +void __savedefault_once_reset()
26 + if (saved_entryno & 0x4000)
28 + int saved_current_entryno = current_entryno;
30 + current_entryno = default_entry;
31 + savedefault_func("\0", BUILTIN_SCRIPT);
32 + current_entryno = saved_current_entryno;
33 + saved_entryno &= 0x3fff;
36 +#endif /* SUPPORT_DISKLESS */
41 --- grub-0.96/stage2/stage2.c~ 2004-07-24 20:53:47.000000000 +0200
42 +++ grub-0.96/stage2/stage2.c 2005-09-02 14:45:04.000000000 +0200
47 +extern void __savedefault_once_reset();
49 /* This is the starting function in C. */
56 +#ifndef SUPPORT_DISKLESS
57 + __savedefault_once_reset();
61 /* If no acceptable config file, goto command-line, starting