* stage2/terminfo.c (ti_set_term): Use a pointer to struct
terminfo instead to avoid GCC's bug, which inserts a reference
to memcpy implicitly.
(ti_get_term): Likewise.
All callers are fixed.
* stage2/terminfo.h (ti_set_term): Updated.
(ti_get_term): Likewise.
* stage2/shared.h (struct linux_kernel_header): New member,
initrd_max_address. Defined in the boot protocol 2.03 or higher.
* stage2/boot.c (load_initrd): If the boot protocol is greater
than or equal to 2.03, use the field ``initrd_max_address''
instead of LINUX_INITRD_MAX_ADDRESS.
* stage2/fsys_ext2fs.c (ext2_is_fast_symlink): New function.
(ext2fs_dir): Use ext2_is_fast_symlink to check if the current
inode is a fast or slow symlink. This change was required
because Linux now uses acl seriously (i.e. incompatibility).
Reported by Chris PeBenito <pebenito@gentoo.org> and Seemant
Kulleen <seemant@gentoo.org>
* lib/device.c (read_device_map) (sho_warning): New internal
function.
(read_device_map): If DRIVE is greater than 8, emit a warning
and ignore the drive, rather than exiting abnormally.
Reported by Greg Newby <newby@arsc.edu>.
Migrated to newer autotools. Also, don't install mkbimage
because its name is too general and it does not conform to the
GNU Coding Standards in some points.
* util/Makefile.am (EXTRA_DIST): New variable.
(sbin_SCRIPTS): Removed mkbimage.
(noinst_SCRIPTS): Added mkbimage.
* stage1/Makefile.am (AM_ASFLAGS): Renamed to ...
(AM_CCASFLAGS): ... this.
* stage2/Makefile.am (pre_stage2_exec_ASFLAGS): Renamed to ...
(pre_stage2_exec_CCASFLAGS): ... this.
(start_exec_ASFLAGS): Renamed to ...
(start_exec_CCASFLAGS): ... this.
(e2fs_stage1_5_exec_ASFLAGS): Renamed to ...
(e2fs_stage1_5_exec_CCASFLAGS): ... this.
(fat_stage1_5_exec_ASFLAGS): Renamed to ...
(fat_stage1_5_exec_CCASFLAGS): ... this.
(ffs_stage1_5_exec_ASFLAGS): Renamed to ...
(ffs_stage1_5_exec_CCASFLAGS): ... this.
(minix_stage1_5_exec_ASFLAGS): Renamed to ...
(minix_stage1_5_exec_CCASFLAGS): ... this.
(reiserfs_stage1_5_exec_ASFLAGS): Renamed to ...
(reiserfs_stage1_5_exec_CCASFLAGS): ... this.
(vstafs_stage1_5_exec_ASFLAGS): Renamed to ...
(vstafs_stage1_5_exec_CCASFLAGS): ... this.
(jfs_stage1_5_exec_ASFLAGS): Renamed to ...
(jfs_stage1_5_exec_CCASFLAGS): ... this.
(xfs_stage1_5_exec_ASFLAGS): Renamed to ...
(xfs_stage1_5_exec_CCASFLAGS): ... this.
(diskless_exec_ASFLAGS): Renamed to ...
(diskless_exec_CCASFLAGS): ... this.
(nbloader_exec_ASFLAGS): Renamed to ...
(nbloader_exec_CCASFLAGS): ... this.
(pxeloader_exec_ASFLAGS): Renamed to ...
(pxeloader_exec_CCASFLAGS): ... this.
* configure.in: Removed.
* configure.ac: New file. Mostly derived from configure.in.
From KB Sriram <mail_kb@yahoo.com>:
* stage2/disk_io.c (set_device) [SUPPORT_NETBOOT]: Added support
for a completion of a network device.
(print_completions): Likewise.
matters for very large fs when tree doesn't fit in cache.
(IH_KEY_OFFSET): Don't check for INFO->version. There are
actually old version file systems that use new version items.
(IH_KEY_ISTYPE): Likewise.
(reiserfs_dir): Likewise.
directory for the menu.lst file, so I corrected this to /boot/grub or
/boot/boot/grub with a comment in parenthesises about /boot being a
serperate partition.
Reported by <bigtoe416@yahoo.co>
* docs/grub.texi (partnew): Fixed the inconsistency between the
implementation and the documentation. The last argument is the
length instead of the ending address.
Reported by Daniel Farrell <s2108287@student.rmit.edu.au>.
* stage2/boot.c (load_image): Check if DATA_LEN plus SECTOR_SIZE
is less than or equal to MULTIBOOT_SEARCH, instead of if
DATA_LEN is less than or equal to MULTIBOOT_SEARCH.
Reported by Neelkanth Natu <neelnatu@yahoo.com>.
From Tilmann Bubeck:
* stage2/builtins.c [SUPPORT_SERIAL] (terminfo_func): Unescape
arguments before copying them, and escape sequences before
printing them.
* stage2/terminfo.h (TERMINFO_LEN): Changed to 40.
* lib/device.c (check_device): If DEVICE is empty, just return
1.
(get_scsi_disk_name) [__QNXNTO__]: Make NAME empty, because SCSI
disks are detected as IDE disks on QNX RTP.
From Taketo Kabe <kabe@sra-tohoku.co.jp>:
* lib/device.c (get_ide_disk_name) [__QNXNTO__]: Set NAME to
"/dev/hdX".
(get_floppy_disk_name) [__QNXNTO__]: Set NAME to "/dev/fdX".
* stage2/mb_info.h (struct AddrRangeDesc): Specified with the
attribute packed.
* stage2/shared.h (struct mmar_desc): Likewise.
From Ilguiz Latypov:
* configure.in: Fix a syntax error in a sed script.
* stage2/bios.c (get_diskinfo): PhoenixBIOS 4.0 Revision 6.0
for ZF Micro might understand the greater buffer size for the
"get drive parameters" int 0x13 call in its own way.
Supposedly the BIOS assumes even bigger space is available and
thus corrupts the stack. This is why we specify the exactly
necessary size of 0x42 bytes.
From Steven Dick <ssd.gnu@mmae.ucf.edu>:
* stage2/pc_slice.h (PC_SLICE_TYPE_DELL_UTIL): New macro.
(IS_PC_SLICE_TYPE_FAT): Recognize PC_SLIDE_TYPE_DELL_UTIL as
well.
From H.J. Lu <hjl@gnu.org>:
* stage2/disk_io.c (part_start): Use unsigned long to support
large disks.
(part_length): Likewise.
* stage2/shared.h (part_start): Likewise.
(part_length): Likewise.
Add a workaround for buggy BIOSes which don't pass boot drive
correctly. The idea is that GRUB forces the fixed disk flag
when booted from a hard disk. When BIOS loads GRUB directly,
the boot drive must be either of 0x00 and 0x80, so this should
work, if those BIOSes always pass zero to %dl. AFAIK, this
assumption is always correct.
* stage2/builtins.c (install_func): Store the fixed disk flag of
the destination drive in BOOT_DRIVE_MASK in Stage 1.
* stage1/stage1.h (STAGE1_BOOT_DRIVE_MASK): New macro.
* stage1/stage1.S (boot_drive_mask): New variable. It is or'ed
to %dl.
* stage2/char_io.c (init_page): Change the software name from
"GRUB" to "GNU GRUB". This was inaccurate. Reported by Ciaran
O'Riordan <coriordan@compsoc.com>.
Change the terminal structure a bit, to turn the cursor state
explicitly. Suggested by Pavel Roskin.
* stage2/term.h (struct term_entry): Remove the member
`nocursor' and add `setcursor'.
[!STAGE1_5] (console_setcursor): New prototype.
[SUPPORT_HERCULES] (hercules_setcursor): Likewise.
[!STAGE1_5] (console_nocursor): Removed.
[SUPPORT_HERCULES] (hercules_nocursor): Likewise.
* stage2/stage2.c (run_menu): Call setcursor instead of
nocursor.
Call setcursor with 1 before starting a boot entry.
* stage2/shared.h (nocursor): Removed.
(setcursor): New prototype.
* stage2/hercules.c (herc_cursor_state): New variable.
(herc_turn_cursor): Removed.
(hercules_nocursor): Likewise.
(hercules_setcursor): New function.
* stage2/char_io.c (get_cmdline): Turn on the cursor at the
beginning, and restore it before returning.
(nocursor): Removed.
(setcursor): New function.
* stage2/asm.S (console_cursor_state): New variable.
(console_cursor_shape): Likewise.
(console_setcursor): New function.
(console_nocursor): Removed.
* grub/asmstub.c (console_setcursor): New function.
(hercules_setcursor): Likewise.
(console_nocursor): Removed.
(hercules_nocursor): Likewise.