The state was 0 - normal or 1 - highlight.
The state is now defined using an enum called color_state.
* stage2/term.h (color_state): New enum.
(COLOR_STATE_STANDARD): Standard color to use when not using user defined.
(COLOR_STATE_NORMAL): User defined normal color.
(COLOR_STATE_HIGHLIGHT): User defined highlight color.
(console_highlight): Renamed to console_setcolorstate.
(serial_highlight): Renamed to serial_setcolorstate.
(hercules_highlight): Renamed to hercules_setcolorstate.
* stage2/hercules.c (herc_highlight_state): Removed.
(herc_standard_color): New variable.
(herc_color_state): Likewise.
(herc_highlight): Renamed to herc_setcolorstate.
(herc_setcolorstate): Added switch to handle new states.
* stage2/console.c (console_highlight_state): Removed.
(console_standard_color): New variable.
(console_color_state): Likewise.
(console_highlight): Renamed to console_setcolorstate.
(console_setcolorstate): Added switch to handle new states.
* stage2/serial.c (serial_highlight): Renamed to serial_setcolorstate.
(serial_setcolorstate): Adjusted 'if' to suit new states.
* grub/asmstub.c (console_highlight): Renamed to console_setcolorstate.
(console_setcolorstate): Adjusted 'if' to suit new states.
* stage2/stage2.c (print_entry): Set color states using new states.
(print_border): Likewise.
* stage2/stage2.c (run_menu): Reverse if (!) to if () for uniformitty.
* stage2/boot.c (load_image): Rewrite the Linux booting support
radically. Now it should work even on a machine having, say,
only 128KB, theoretically. Of course, GRUB itself doesn't work
on such a system, though.
(load_initrd): Initialize LH based on CUR_ADDR, because the
location becomes dynamic.
* stage2/shared.h (LINUX_MAX_SETUP_SECTS): Set to 64.
(LINUX_HEAP_END_OFFSET): Set to (0x9000 - 0x200).
(LINUX_STAGING_AREA): Removed.
(LINUX_SETUP): Likewise.
(LINUX_KERNEL): Likewise.
(LINUX_KERNEL_MAXLEN): Likewise.
(LINUX_SETUP_SEG): Likewise.
(LINUX_INIT_SEG): Likewise.
(LINUX_SETUP_STACK): Set to 0x9000.
(LINUX_BZIMAGE_ADDR): New macro.
(LINUX_ZIMAGE_ADDR): Likewise.
(LINUX_OLD_REAL_MODE_ADDR): Likewise.
(CL_MY_LOCATION): Removed.
(CL_MY_END_ADDR): Likewise.
(CL_BASE_ADDR): Likewise.
(CL_MAGIC): Renamed to ...
(LINUX_CL_MAGIC): ... this.
(LINUX_CL_OFFSET): New macro.
(LINUX_CL_END_OFFSET): Likewise.
(LINUX_SETUP_MOVE_SIZE): Likewise.
(struct linux_kernel_header): Change the type of the member
"cmd_line_ptr" to char *.
(linux_data_tmp_addr): Declared.
(linux_data_real_addr): Likewise.
* stage2/asm.S [!STAGE1_5] (linux_data_tmp_addr): New variable.
[!STAGE1_5] (linux_data_real_addr): Likewise.
[!STAGE1_5] (big_linux_boot): Copy the real mode part from
LINUX_DATA_TMP_ADDR to LINUX_DATA_REAL_ADDR.
* grub/asmstub.c (linux_data_tmp_addr): New variable.
(linux_data_real_addr): Likewise.
From Mark Kettenis <kettenis@chello.nl>:
* stage2/boot.c (load_image): Recognize newer FreeBSD kernels.
* stage2/i386-elf.h (EI_OSABI): New macro.
(EI_ABIVERSION): Likewise.
(ELFOSABI_FREEBSD): Likewise.
(EI_PAD): Set to 9.
* stage2/shared.h (boot_part_offset): Removed.
* stage2/disk_io.c (set_bootdev): Copy the partition information
here. Now this function can call rawread, so it can fail.
(boot_part_offset): Removed.
* stage2/builtins.c (boot_func): Don't copy the partition
information here.
(real_root_func): Check ERRNUM after calling set_bootdev.
* stage2/serial.c [!GRUB_UTIL] (inb): Added a delay into this
function itself.
[!GRUB_UTIL] (outb): Likewise.
[!GRUB_UTIL] (serial_hw_put): Increase the timeout value, and
don't call serial_hw_delay explicitly any longer.
(fill_input_buf): Increase the maximum number of retries, reset
the counter to zero after getting a valid character, and don't
call serial_hw_delay explicitly any longer.
* stage2/builtins.c [SUPPORT_SERIAL || SUPPORT_HERCULES]
(terminal_func): Set CURRENT_TERM to each of selected terminals
before calling grub_printf, and restore CURRENT_TERM after it.
Reported by Ilguiz Latypov.
Prepend a carriage return to the prompting message, because it
is ugly that the same messages fulfill the whole screen.
* stage2/disk_io.c [SUPPORT_NETBOOT] (GRUB): Defined.
[SUPPORT_NETBOOT]: Include etherboot.h.
[!STAGE1_5] (print_completions) [SUPPORT_NETBOOT]: When
completing a disk name, if NETWORK_READY is true, add "nd" as a
completion.
* netboot/main.c (ifconfig): If GW is specified, clear out the
ARP entry for the gateway. If SVR is specified, clear out the
ARP entry for the server. Reported by Uwe Dannowski
<ud3@ira.uka.de>.
* util/grub-md5-crypt.in: Prompt to retype a password, and check
if the passwords matches. Suggested by Matt Perry
<matt@primefactor.com>.
Also, don't use Perl any longer, because *BSD's sh and GNU
support ``read -r'', and GRUB doesn't support any other
operating system anyway.
* stage2/builtins.c (boot_func): Load the boot partition
information, only if the address of the boot partition entry is
set appropriately.
(real_root_func): If ATTEMPT_MOUNT is false, call open_partition
and if successful, call set_bootdev, to set the offset of the
boot partition and the address of the boot paetition entry.
IF ATTEMPT_MOUNT is false, don't set BOOTDEV. The BSD evil hack
is useless with the command "rootnoverify" anyway.
* stage2/disk_io.c (boot_part_addr): Initialized with zero
explicitly, to emphasize that it is invalid.
Define the behavior of the boot loader when the load end address
and the bss end address are zero in the Multiboot Specification,
and add the support into GRUB. I've modified a patch from Yuri
Zaporogets <yuriz@ukr.net>.
* stage2/boot.c (load_image): In the case of Multiboot a.out
kludge, set the load end address to the load address plus the
size of the OS image file, if it is zero. Similarly, set the bss
end address to the load end address, if it is zero.
* util/mbchk.c (check_multiboot): Don't check if the load
address is greater than or equal to the load end address, if the
load end address is zero. Don't check if the load end address is
greater than the bss end address, if the bss end address is
zero. And, don't check if the load end address is less than or
equal to the entry address, if the load end address is zero.
* docs/multiboot.texi (The address fields of Multiboot header):
Added descriptions about the behavior of the boot loader when
LOAD_END_ADDR is zero and BSS_END_ADDR is zero.
* stage2/builtins.c (boot_func): If DEBUG is true, print
BOOT_DRIVE and BOOT_PART_OFFSET.
Don't set ERRNUM after rawread failed, because rawread should
set ERRNUM itself.
* lib/device.c (read_device_map): Show an error message and exit
abnormally, if MAP[DRIVE] has already been filled.
* util/grub-install.in: If there is any dulicated entry, print
an error message and exit abnormally.
* netboot/etherboot.h (ETH_MAX_MTU): Because some DHCP/BOOTP
servers don't treat the maximum length the same as Etherboot,
subtract the size of an IP header and that of an UDP header.
From Jean-Jacques Michel <jjmichel@linbox.com>:
* stage2/boot.c (load_image): For Linux, check if DATA_LEN is
greater than MULTIBOOT_SEARCH. If that's true, read the rest
after copying data already read in BUFFER.
* stage2/boot.c (load_image): For Linux, don't check if the
length of protected mode code is greater than or equal to the
expected length minus 16. Instead, just check if no error
occurred. That was problematic, because memdisk has no protected
mode code. Also, I don't see what the magic number 16 was for.
* stage2/builtins.c [GRUB_UTIL] (dump_func): New function.
[GRUB_UTIL] (builtin_dump): New variable.
(builtin_table) [GRUB_UTIL]: Added a pointer to BUILTIN_DUMP.
* util/grub-install.in: Make sure that GRUB reads the same
images as the host operating system by comparing the result of
running the command "dump" with the contents of the OS file.
* docs/grub.texi (General commands): Added ``pager'' into the
menu.
(pager): New subsection.
(terminal): Added a description about the option
``--lines=LINES''.
* configure.in (AC_INIT_AUTOMAKE): Set the version number to
0.92.