* netboot/fsys_tftp.c (buf_fill): Cast 1 to unsigned short
explicitly so that the constant doesn't extend unsigned short
to int automatically.
Reported by Eduard Guzovsky <eguzovsk@enterasys.com>.
* docs/grub.texi (Invoking grub-md5-crypt): Fixed the chapter
name.
Reported by Martin Pool <mbp@sourcefrog.net>.
* configure.ac (STAGE2_CFLAGS): Check if -fno-stack-protector is
supported by GCC. If yes, added the option. This is necessary
for OpenBSD, because the stack protector defines additional
symbols. Reported by uc.sheda <uc.sheda@laposte.net>.
* stage2/char_io.c [!GRUB_UTIL] (memcpy): New function. It is
defined as an alias of grub_memmove. This is copied from GRUB 2.
* stage2/disk_io.c (print_completions): Simplified conditionals
to make it easier to edit the file with Emacs.
Added support for (cd).
(set_device): Likewise.
* stage2/common.c (init_bios_info): Check if BOOT_DRIVE is a
CDROM drive. If it is true, set CDROM_DRIVE to BOOT_DRIVE.
(cdrom_drive): New variable.
From Leonid Lisovskiy <lly@pisem.net>:
* stage2/start_eltorito.S: New file.
* stage2/stage2.c (run_menu): Use GRUB_INVALID_DRIVE instead of
0xFF.
* stage2/shared.h (STAGE2_ID_ISO9660_STAGE1_5): New macro.
[FSYS_ISO9660] (STAGE2_ID): Set to STAGE2_ID_ISO9660_STAGE1_5.
(struct geometry): Added a new member ``sector_size''.
(BIOSDISK_FLAG_CDROM): New macro.
(cdrom_drive): Declared.
* stage2/fsys_iso9660.c: New file.
* stage2/iso9660.h: Likewise.
* stage2/filesys.h (FSYS_ISO9660_NUM): New macro.
[FSYS_ISO9660] (iso9660_mount): Declared.
[FSYS_ISO9660] (iso9660_read): Likewise.
[FSYS_ISO9660] (iso9660_dir): Likewise.
(NUM_FSYS): Added FSYS_ISO9660_NUM.
* stage2/disk_io.c (fsys_table) [FSYS_ISO9660]: Added iso9660.
(current_drive): Use GRUB_INVALID_DRIVE.
(log2): New function.
(rawread): Use BUF_GEOM.SECTOR_SIZE instead of SECTOR_SIZE.
Change the type of BUFADDR from int to char *.
Use a virtual track to make sure that one track fits in the
buffer.
(sane_partition): Allow CURRENT_DRIVE to be CDROM_DRIVE, because
a bios drive for a CD-ROM is often assigned to greater than
0x88.
(set_device): Use GRUB_INVALID_DRIVE instead of 0xFF.
(setup_part): Likewise.
* stage2/cmdline.c (init_cmdline): Use GRUB_INVALID_DRIVE.
* stage2/builtins.c (install_func): Use GRUB_INVALID_DRIVE.
(setup_func): Added iso9660_stage1_5.
* stage2/bios.c (biosdisk): Don't fall back to the CHS mode
if the drive is a CDROM.
(get_cdinfo): New function.
(get_diskinfo): Call get_cdinfo if the drive is greater than or
equal to 0x88 or the drive supports LBA.
Set the sector size to SECTOR_SIZE if it is not a CD-ROM.
* stage2/asm.S (biosdisk_int13_extensions): Take a word
argument AX instead of a byte argument AH.
(get_diskinfo_int13_extensions): Removed.
* stage2/Makefile.am (noinst_HEADERS): Added iso9660.h.
(libgrub_a_SOURCES): Added fsys_iso9660.c.
(libgrub_a_CFLAGS): Added -DFSYS_ISO9660=1.
(pkgdata_DATA): Added iso9660_stage1_5 and stage2_eltorito.
(noinst_PROGRAMS): Added iso9660_stage1_5.exec and
start_eltorito.exec.
(noinst_DATA): Added start_eltorito.
(pre_stage2_exec_SOURCES): Added fsys_iso9660.c.
(START_ELTORITO_LINK): New variable.
(start_eltorito_exec_SOURCES): Likewise.
(start_eltorito_exec_CCASFLAGS): Likewise.
(start_eltorito_exec_LDFLAGS): Likewise.
(start_eltorito_exec-start.$(OBJEXT)): New dependency.
(stage2_eltorito): New target.
(iso9660_stage1_5_exec_SOURCES): New variable.
(iso9660_stage1_5_exec_CFLAGS): Likewise.
(iso9660_stage1_5_exec_CCASFLAGS): Likewise.
(iso9660_stage1_5_exec_LDFLAGS): Likewise.
* stage1/stage1.h (GRUB_INVALID_DRIVE): New macro.
* stage1/stage1.S (boot_drive): Use the macro GRUB_INVALID_DRIVE.
(real_start): Likewise.
* lib/device.c (get_drive_geometry): Set GEOM->SECTOR_SIZE to
SECTOR_SIZE by default.
* configure.ac (--disable-iso9660): New option.
From Boji Tony Kannanthanam <boji.t.kannanthanam@intel.com>:
* util/grub-install.in (convert): Add support for ATARAID
device names.
* lib/device.c (get_ataraid_disk_name) [__linux__]: New
function.
(init_device_map) [__linux__]: Probe ATARAID disks.
* stage2/size_test (check): Don't use the local statement any
longer. It was unneeded actually. Reported by Paul Jarc.
From Sergey Matveychuk <sem@ciam.ru>:
* lib/device.c (get_drive_geometry): Do not open the same device
more than once unnecessarily.
(get_drive_geometry) [__FreeBSD_version >= 500040]: Use new
ioctl methods.
(get_floppy_disk_name) [__FreeBSD__ >= 4]: Use /dev/fd%d rather
than /dev/rfd%d.
(get_ide_disk_name) [__FreeBSD__ >= 4]: Use /dev/ad%d rather
than /dev/rad%d.
(get_scsi_disk_name) [__FreeBSD__ >= 4]: Use /dev/da%d rather
than /dev/rda%d.
* grub/asmstub.c (get_diskinfo): Check if ERRNO is EPERM as
well.
From Yury V. Umanets <umka@namesys.com>:
* stage2/fsys_reiserfs.c (REISER3FS_SUPER_MAGIC_STRING): New
macro.
(reiserfs_mount): Added checks for ReiserFS 3.
(reiserfs_embed): Likewise.
2004-01-25 Yoshinori K. Okuji <okuji@enbug.org>
* docs/grub.texi (Obtaining and Building GRUB): Instead of
describing how to use the anoncvs method, specify the URL of
the description page on Savannah.
Reported by Bernhard Treutwein.
From Thomas Schwinge <kischde@gmx.net>:
* grub/Makefile.am (AM_CPPFLAGS): New variable.
(AM_CFLAGS): Removed all cpp flags.
* stage2/xfs.h (__int8_t): Renamed to ...
(xfs_int8_t): ... this.
(__uint8_t): Renamed to ...
(xfs_uint8_t): ... this.
(__int16_t): Renamed to ...
(xfs_int16_t): ... this.
(__uint16_t): Renamed to ...
(xfs_uint16_t): ... this.
(__int32_t): Renamed to ...
(xfs_int32_t): ... this.
(__uint32_t): Renamed to ...
(xfs_uint32_t): ... this.
(__int64_t): Renamed to ...
(xfs_int64_t): ... this.
(__uint64_t): Renamed to ...
(xfs_uint64_t): ... this.
All callers are changed.x
From Egmont Koblinger <egmont@uhulinux.hu>:
* util/grub-install.in: Support an install devices in GRUB's
notation without parentheses.
* docs/grub.texi (Installing GRUB using grub-install): Added an
example of using grub-install without parentheses.
* util/grub-install.in: Use the first word of GRUB_SHELL when
checking if the grub shell is present. This is necessary to
support options to the grub shell (e.g. grub --read-only).
From Eric Kvaalen <E_Kvaalen.Arnesen@noos.fr>:
* docs/grub.texi: Many bug fixes.
* 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.