* stage2/boot.c (linux_mem_size): New variable.
(load_image): Check a mem= option and set LINUX_MEM_SIZE to the
specified memory size, if any. Otherwise, to zero. When an
overflow is detected, use LINUX_INITRD_MAX_ADDRESS instead.
(load_initrd): If LINUX_MEM_SIZE is non-zero, use it instead of
the actual memory size.
* stage2/char_io.c (safe_parse_maxint): Use ERR_NUMBER_OVERFLOW
instead of ERR_NUMBER_PARSING, when an overflow occurs.
* stage2/common.c [!STAGE1_5] (err_list): Added
ERR_NUMBER_OVERFLOW.
* stage2/shared.h (ERR_NUMBER_OVERFLOW): New constant.
* stage2/stage2.c (run_menu): Call cls outside the loop to run
scripts.
* stage2/cmdline.c (run_script): Prompt a user's intervention,
only when FALLBACK_ENTRY is negative.
device for given file or directory. Resolve symlinks to fix
problem on Linux with devfs and old device names in /etc/fstab.
Use find_device() for root_device, bootdir_device and
grubdir_device.
* grub/main.c (OPT_NO_PAGER): New macro.
(longopts): Added an entry for "--no-pager".
(usage): Added a description about "--no-pager".
(main): In case of OPT_NO_PAGER, set USE_PAGER to zero. The same
thing is done with OPT_BATCH, because the pager is just harmful
in batch mode.
An internal pager is implemented.
* stage2/builtins.c (pager_func): New function.
(builtin_pager): New variable.
(terminal_func): New option, "--lines=LINES" is added. If this
option is specified, set MAX_LINES to the value. Otherwise, set
MAX_LINES to 24.
(vbeprobe_func): Remove the pager code specific to this
function.
(builtin_table): Added a pointer to BUILTIN_PAGER.
* stage2/char_io.c (max_lines) [!STAGE1_5]: New variable.
(count_lines) [!STAGE1_5]: Likewise.
(use_pager) [!STAGE1_5]: Likewise.
(grub_putchar) [!STAGE1_5]: if C is a newline and COUNT_LINES is
not -1, count up the number of lines. If it exceeds the maximum
number of lines minus 2, show a message and wait for input of
return key. "minus 2" is to reserve space for the message
printed by this internal pager.
* stage2/cmdline.c (enter_cmdline): If USE_PAGER is true, set
COUNT_LINES to zero, before running a command, and reset
COUNT_LINES to -1 after that.
* stage2/shared.h (max_lines) [!STAGE1_5]: Declared.
(count_lines) [!STAGE1_5]: Likewise.
(use_pager) [!STAGE1_5]: Likewise.
* stage2/fsys_jfs.c (jfs_read) [STAGE1_5]: Set and reset
DISK_READ_FUNC even in Stage 1.5.
* stage2/fsys_xfs.c (xfs_read) [STAGE1_5]: Likewise.
* stage2/stage1_5.c (saved_sector): Initialized with -1.
(cmain): Check if SAVED_SECTOR was set appropriately after
reading the second sector of Stage 2. If SAVED_SECTOR is not
set (i.e. it is equal to -1), print an error and stop.
* grub/main.c (use_preset_menu): New variable.
(OPT_PRESET_MENU): New macro.
(longopts): Added an entry for "--preset-menu".
(usage): Added a description for "--preset-menu". Also, change
the first character of the description for "--device-map" to
lower case for consistency.
(main): Set USE_PRESET_MENU to 1 in the case of OPT_PRESET_MENU.
* stage2/shared.h (use_preset_menu): Declared.
* stage2/stage2.c [PRESET_MENU_STRING || SUPPORT_DISKLESS]
(open_preset_menu) [GRUB_UTIL]: If USE_PRESET_MENU is false,
return zero immediately.
* stage2/common.c [SUPPORT_DISKLESS]
(setup_diskless_environment): Removed. The feature is moved to
the preset menu.
* stage2/stage2.c [SUPPORT_DISKLESS] (preset_menu): Set to the
string "bootp\n".
[SUPPORT_DISKLESS] (preset_menu_offset): Defined, as if
PRESET_MENU_STRING is defined.
[SUPPORT_DISKLESS] (open_preset_menu): Likewise.
[SUPPORT_DISKLESS] (read_from_preset_menu): Likewise.
[SUPPORT_DISKLESS] (close_preset_menu): Likewise.
The preset menu has a priority over the configuration file.
Suggested by Christoph Plattner.
* stage2/stage2.c [PRESET_MENU_STRING] (open_preset_menu):
Check if PRESET_MENU is not NULL.
[PRESET_MENU_STRING] (close_preset_menu): Set PRESET_MENU to
NULL.
(cmain): New internal function, reset. This function resets
AUTO_FILL, CONFIG_LEN, MENU_LEN, NUM_ENTRIES, CONFIG_ENTRIES,
MENU_ENTRIES and call init_config.
Try to open the preset menu first, and try to open the
configuration file, only if that failed.
Even if the preset menu was read, try to open the configuration
file. This time, opening the preset menu never succeed, because
close_preset_menu ensures that the preset menu is available at
most once.
* stage1/stage1.S: Don't call INT 13, AH=48H, because it is
difficult to call this function with the workaround implemented
in the previous change due to the size limit of Stage 1.
(lba_mode) [NO_BUGGY_BIOS_IN_THE_WORLD]: Don't check the
geometry explicitly. This shouldn't be harmful, as INT 13,
AH=42H should take care of it, and if you cannot read Stage 2
even with LBA because of a geometry problem, you can never read
it.
* stage2/start.S (lba_mode) [NO_BUGGY_BIOS_IN_THE_WORLD]:
Likewise.
* stage2/bios.c (get_diskinfo): Clear out the structure DRP
before calling get_diskinfo_int13_extensions, because the Ralf
Brown's Interrupt List says that Dell machines using PhoenixBIOS
4.0 Release 6.0 fail, if DRP.FLAGS is not zero. Setting the
entire structure to zero may be overkill, but it should be safe.
* stage2/char_io.c [STAGE1_5] (grub_memset): Defined.
assignments received by the FSF.
Jason Thomas was added.
Erich Stefan Boleyn was moved into those who assigned their copyrights.
Gordon Matzigkeit was moved into the others, because he still wasn't listed
in fencepost.gnu.org:/gd/gnuorg/copyright.list.
The remaining problem is that we haven't had copyright assignments of
VaX#8, Heiko Schroeder and Gordon Matzigkeit. As for the first two, Erich
is now trying to contact them by proxy. So I'm just waiting.
As for Gordon.... oh, what are you doing, Gordon?! Hurry up, please!