* include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
definitions.
* disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
that no multiple data or metadata areas are supported and `Unknown
metadata header'.
use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
* kern/misc.c (grub_itoa): Removed function
(grub_ltoa): likewise
(grub_vsprintf): use grub_lltoa
* util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
<sys/param.h> and <sys/sysctl.h>.
(open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
to add 0x10 to `kern.geom.debugflags' if it's not already set, before
opening the device and reset them afterwards.
* util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
doestn't exist. Check also for /boot/kernel/kernel.gz. Print
`freebsd_loadenv' only when devices.hints exist.
(OFDISK_HASH_SZ): Define.
(ofdisk_hash): New hash table.
(ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
(grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
instead of device phandle which is not unique.
* configure.ac: Change the logic when we check for target tools.
Do it when the target is specified and it's different from the
specified value of the host.
* util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
(grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
GNU/kFreeBSD. Check if a device is a character device. Use
DIOCGMEDIASIZE to get the size.
(convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
support for GNU/kFreeBSD.
(grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
is a character device instead of a block device. Add support for
FreeBSD device names.
* util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
is a character device instead of a block device.
* util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
is a character device instead of a block device.
* util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
(grub_util_biosdisk_open) [__FreeBSD__]: Add support for
FreeBSD. Check if a device is a character device. Use
DIOCGMEDIASIZE to get the size.
(convert_system_partition_to_system_disk) [__FreeBSD__]: Add
support for FreeBSD.
(grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
is a character device instead of a block device. Add support for
FreeBSD device names.
* util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
a character device instead of a block device.
(grub_util_check_char_device): New function.
* util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
a character device instead of a block device.
* include/grub/util/getroot.h (grub_util_check_char_device): New
prototype.
slots are of type grub_ieee1275_cell_t.
(grub_nand_read): Likewise.
* kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
macros are used to compare values in arg/ret block of the call.
(grub_ieee1275_finddevice, grub_ieee1275_get_property,
grub_ieee1275_next_property, grub_ieee1275_get_property_length,
grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
grub_ieee1275_instance_to_path, grub_ieee1275_write,
grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
grub_ieee1275_close, grub_ieee1275_set_property,
grub_ieee1275_set_color): All ieee1275 call arg slots are of type
grub_ieee1275_cell_t.
* kern/ieee1275/openfw.c (grub_map): Likewise.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
grub_ieee1275_phandle_t): Define as grub_unit32_t type.
UFS improvements
* fs/ufs.c (INODE_NBLOCKS): new definition
(struct grub_ufs_dirent): added fields for non-BSD dirents
(grub_ufs_get_file_block): fixed double indirect handling
(grub_ufs_lookup_symlink): use more robust way to determine whether
symlink is inline
(grub_ufs_find_file): support for non-BSD dirents
(grub_ufs_dir): support for non-BSD dirents
* include/grub/misc.h (ARRAY_SIZE): New macro.
* include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
New macro.
* loader/i386/linux.c (allocate_pages): Use free_pages().
(grub_linux_unload): Don't use free_pages().
(grub_linux_boot): Prevent accessing linux_vesafb_modes with a
wrong index. Treat all other modes as text modes.
(grub_cmd_linux): Initialize vid_mode unconditionally to
GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
Support for mtime and further expandability of dir command
* include/grub/lib/datetime.h: moved to ...
* include/grub/datetime.h: ... moved here and added
declaration of grub_unixtime2datetime. All users updated
* include/grub/fs.h: new syntax for dir and mtime functionin
struct grub_fs
* include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
and GRUB_FSHELP_FLAGS_MASK
* commands/ls.c (grub_ls_list_files): Write mtime in long format
* fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
(grub_ext2_mtime): new function
* fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
(grub_hfsplus_mtime): new function
* fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
(GRUB_UFS_ATTR_FILE): likewise
(GRUB_UFS_ATTR_LNK): likewise
(struct grub_ufs_sblock): new fields mtime
(grub_ufs_read_inode): new parameter to read inode to a separate buffer
all users updated
(grub_ufs_dir): mtime support
(grub_ufs_mtime): new function
* fs/affs.c (grub_affs_dir): use new dir syntax
* fs/afs.c (grub_afs_dir): likewise
* fs/cpio.c (grub_cpio_dir): likewise
* fs/fat.c (grub_fat_find_dir): likewise
* fs/hfs.c (grub_hfs_dir): likewise
* fs/iso9660.c (grub_iso9660_dir): likewise
* fs/jfs.c (grub_jfs_dir): likewise
* fs/minix.c (grub_minix_dir): likewise
* fs/ntfs.c (grub_ntfs_dir): likewise
* fs/reiserfs.c (grub_reiserfs_dir): likewise
* fs/sfs.c (grub_sfs_dir): likewise
* fs/xfs.c (grub_xfs_dir): likewise
* util/hostfs.c (grub_hostfs_dir): likewise
* lib/datetime.c: moved to ...
* normal/datetime.c: ... moved here
(grub_unixtime2datetime): new function
* kern/rescue.c (grub_rescue_print_files): use new dir syntax
* normal/completition.c (iterate_dir): use new dir syntax
* normal/misc.c (grub_normal_print_device_info): tell the
last modification time of a volume
* kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
* conf/common.rmk: added lib/datetime.c to ls.mod
* conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
(normal_mod_SOURCES): likewise
(datetime_mod_SOURCES): Removed lib/datetime.c
* conf/i386-efi.rmk: likewise
* conf/i386-ieee1275.rmk: likewise
* conf/i386-pc.rmk: likewise
* conf/powerpc-ieee1275.rmk: likewise
* conf/sparc64-ieee1275.rmk: likewise
* conf/x86_64-efi.rmk: likewise
Trim trailing spaces in FAT label and support mtools-like labels
* fs/fat.c (grub_fat_iterate_dir): New function based
on grub_fat_find_dir
(grub_fat_find_dir): use grub_fat_iterate_dir
(grub_fat_label): likewise