* grub-core/fs/zfs/zfs.c (zlib_decompress): New function.
(decomp_table): Add zlib entries.
(zio_read): USe 8 bits for compression function rather than 3.
* include/grub/zfs/zio.h (zio_compress): Add zlib values.
* grub-core/kern/misc.c (grub_divmod64_full): Renamed to ...
(grub_divmod64): ... this.
* include/grub/misc.h (grub_divmod64): Removed. All users switch to full
version.
(grub_fat_bpb): Moved to ...
* include/grub/fat.h (grub_fat_bpb): ... here. New file.
* grub-core/loader/i386/pc/chainloader.c: Include grub/fat.h and
grub/ntfs.h.
* include/grub/i386/pc/chainloader.h (grub_chainloader_flags_t):
Moved from here...
* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_flags_t): ...
here.
* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_patch_bpb):
New function.
(grub_chainloader_cmd): Patch BPB if --bpb is given.
(GRUB_MOD_INIT): Show --bpb.
* grub-core/loader/i386/pc/ntldr.c (grub_cmd_ntldr): Patch BPB.
* grub-core/normal/main.c (features): New variable.
(GRUB_MOD_INIT): Set feature_* variables.
* include/grub/i386/pc/chainloader.h (grub_chainloader_patch_bpb): New
proto.
* include/grub/ntfs.h (grub_ntfs_bpb): New field bios_drive.
* grub-core/fs/affs.c (grub_affs_time): New struct.
(grub_affs_file): New field mtime.
(grub_fshelp_node): Changed 'block' and 'parent' to more appropriate
type. Removed 'size'. New field 'di'. All users updated.
(grub_affs_mount): Simplify checsum checking.
(grub_affs_iterate_dir): New helper grub_affs_create_node.
(grub_affs_dir): Handle mtime.
* grub-core/fs/cpio.c (grub_cpio_find_file): Handle mtime.
(grub_cpio_dir): Likewise.
* grub-core/fs/hfs.c (grub_hfs_dirrec): New fields 'ctime' and 'mtime'.
(grub_hfs_filerec): New field mtime.
(grub_hfs_dir): Handle mtime.
(grub_hfs_mtime): New function.
(grub_hfs_fs): Register grub_hfs_mtime.
* grub-core/fs/iso9660.c (grub_iso9660_date2): New struct.
(grub_iso9660_dir): New field mtime.
(grub_fshelp_node): New field dirent.
(iso9660_to_unixtime): New function.
(iso9660_to_unixtime2): Likewise.
(grub_iso9660_read_symlink): Use node->dirent.
(grub_iso9660_iterate_dir): Likewise.
(grub_iso9660_dir): Set mtime.
(grub_iso9660_mtime): New function.
(grub_iso9660_fs): Register grub_iso9660_mtime.
* grub-core/fs/jfs.c (grub_jfs_time): New struct.
(grub_jfs_inode): New fields atime, ctime and mtime.
(grub_jfs_dir): Set mtime.
* grub-core/fs/minix.c (grub_minix_dir): Likewise.
* grub-core/fs/ntfs.c (list_file): Set mtime.
(grub_ntfs_dir): Likewise.
* grub-core/fs/reiserfs.c (grub_fshelp_node): New field 'mtime'.
(grub_reiserfs_iterate_dir): Set mtime.
(grub_reiserfs_dir): Likewise.
* grub-core/fs/sfs.c (grub_sfs_obj): New field mtime.
(grub_fshelp_node): Likewise.
(grub_sfs_iterate_dir): Set mtime.
(grub_sfs_dir): Likewise.
* grub-core/fs/udf.c (grub_udf_dir): Set mtime.
* grub-core/fs/xfs.c (grub_xfs_time): New struct.
(grub_xfs_inode): New fields atime, mtime, ctime.
(grub_xfs_dir): Set mtime.
* include/grub/datetime.h (grub_datetime2unixtime): New function.
* include/grub/hfs.h (grub_hfs_sblock): New fields ctime and mtime.
* include/grub/ntfs.h (grub_fshelp_node): New field mtime.
Support UDF symlinks.
* grub-core/fs/udf.c (grub_udf_iterate_dir): Handle symlinks.
(grub_ufs_read_symlink): New function. All users updated.
Check amiga partmap checksum.
* grub-core/partmap/amiga.c (grub_amiga_rdsk): Pad to 128 bytes.
(grub_amiga_partition): Likewise.
(amiga_partition_map_checksum): New function.
(amiga_partition_map_iterate): Check checksum.
* grub-core/Makefile.core.def (minix3): New module.
* grub-core/fs/minix.c (GRUB_MINIX_MAGIC) [MODE_MINIX3]: New value.
(GRUB_MINIX_BSIZE): Removed.
(GRUB_MINIX_INODE_DIR_BLOCKS): New definition. All users updated.
(grub_minix_ino_t): New type.
(grub_minix_le_to_cpu_ino): New macro.
(GRUB_MINIX_ZONE2SECT): New definition. All users updated.
(grub_minix_sblock) [MODE_MINIX3]: Change for minix3.
(grub_minix_data): New field block_size.
(grub_minix_read_file): Handle 64-bit correctly.
* grub-core/fs/minix3.c: New file.
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
GRUB_ERR_BAD_FS rather than GRUB_ERR_IO if the disk is not a pxe
disk; otherwise grub_fs_probe will not fall back to the next
filesystem.
(grub_pxefs_open): Likewise, for consistency.
Reported and tested by: Ezekiel Grave.
even more important testing by Colin.
* Makefile.util.def (libgrubmods.a): Add crc.c and gzio.c
* grub-core/Makefile.core.def (btrfs): Add crc.c.
* grub-core/fs/btrfs.c: Stub replaced with real implementation.
* grub-core/io/gzio.c (grub_gzio): New fields mem_input_size,
mem_input_off and mem_input. All users updated to accept in-RAM input.
(gzio_seek): New function.
(test_zlib_header): Likewise.
(grub_gzio_read): Likewise.
(grub_zlib_decompress): Likewise.
* grub-core/kern/emu/getroot.c (grub_find_root_device_from_mountinfo):
Accept partial and non-virtual mounts.
(grub_guess_root_device): Do rescanning after device_from_mountinfo to
avoid receiving /dev/dm-X as device.
* grub-core/kern/emu/misc.c (grub_make_system_path_relative_to_its_root):
Handle bind and partial mounts.
* grub-core/lib/crc.c: New file.
* include/grub/deflate.h: Likewise.
* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo): New
proto.
* include/grub/lib/crc.h: New file.
memory corruptions.
* grub-core/fs/jfs.c (struct grub_jfs_diropen): Interpret bytes as
unsigned.
(grub_jfs_lookup_symlink): Make ino a grub_uint32_t rather than int.
(grub_jfs_blkno): Use 64-bit quantities for block sectors.
(grub_jfs_read_inode): Likewise.
(grub_jfs_opendir): Likewise. Remove now useless casts.
(grub_jfs_getent): Likewise.
Make ino a grub_uint32_t rather than int.
(grub_jfs_mount): Ensure that blksize and log2_blksize are consistent.
(grub_jfs_read_file): Use 64-bit quantities when necessary. Replace
division and module with bit operations.
(grub_jfs_find_file): Make ino a grub_uint32_t.
(grub_jfs_lookup_symlink): Likewise. Use 64-bit quantities