]> git.proxmox.com Git - grub2.git/log
grub2.git
12 years ago * grub-core/disk/raid6_recover.c (grub_raid6_recover): Get start_sector
Vladimir 'phcoder' Serbinenko [Fri, 4 Nov 2011 12:22:38 +0000 (13:22 +0100)]
* grub-core/disk/raid6_recover.c (grub_raid6_recover): Get start_sector
for the right device.

12 years ago * include/grub/kernel.h (grub_module_header): Make type into uint32 as
Vladimir 'phcoder' Serbinenko [Fri, 4 Nov 2011 12:18:30 +0000 (13:18 +0100)]
* include/grub/kernel.h (grub_module_header): Make type into uint32 as
expected by grub-mkimage and it's more clear since there is no implicit
padding.

12 years ago * grub-core/disk/raid.c (scan_devices): Don't derference NULL on whole
Vladimir 'phcoder' Serbinenko [Fri, 4 Nov 2011 12:15:29 +0000 (13:15 +0100)]
* grub-core/disk/raid.c (scan_devices): Don't derference NULL on whole
disk.
* grub-core/disk/lvm.c (do_lvm_scan): Likewise.

12 years ago * util/grub-mkrescue.in: Fix handling xorriso option.
Philipp Matthias Hahn [Thu, 3 Nov 2011 15:49:02 +0000 (16:49 +0100)]
* util/grub-mkrescue.in: Fix handling xorriso option.

12 years ago * grub-core/gettext/gettext.c (grub_gettext_init_ext): Exit if local is
Vladimir 'phcoder' Serbinenko [Thu, 3 Nov 2011 15:04:26 +0000 (16:04 +0100)]
* grub-core/gettext/gettext.c (grub_gettext_init_ext): Exit if local is
NULL.

12 years ago * util/grub.d/10_linux.in: Add Slackware initrd naming.
crocket [Thu, 3 Nov 2011 14:21:47 +0000 (15:21 +0100)]
* util/grub.d/10_linux.in: Add Slackware initrd naming.

12 years ago XZ CRC64 and SHA256 support.
Vladimir 'phcoder' Serbinenko [Thu, 3 Nov 2011 14:13:30 +0000 (15:13 +0100)]
XZ CRC64 and SHA256 support.

* Makefile.util.def (libgrubmods): Add crc64.c.
* grub-core/Makefile.core.def (crc64): New module.
* grub-core/lib/crc64.c: New file.
* grub-core/lib/xzembed/xz_dec_stream.c (xz_dec_hash)
[!GRUB_EMBED_DECOMPRESSOR]: Rename crc32_context to hash_context.
Fix the type.
(MAX_HASH_SIZE): New define.
(xz_dec) [!GRUB_EMBED_DECOMPRESSOR]: Add generic hash fields.
(dec_block) [!GRUB_EMBED_DECOMPRESSOR]: Handle non-crc32 hashes.
(index_update) [!GRUB_EMBED_DECOMPRESSOR]: Likewise.
(dec_index) [!GRUB_EMBED_DECOMPRESSOR]: Likewise.
(crc32_validate) [!GRUB_EMBED_DECOMPRESSOR]: Rename to ...
(hash_validate) [!GRUB_EMBED_DECOMPRESSOR]: ... this.
Handle non-crc32 hashes.
(hashes) [!GRUB_EMBED_DECOMPRESSOR]: New variable.
(dec_stream_header): Handle non-crc32 hashes.
(dec_stream_footer): Likewise.
(dec_block_header): Likewise.
(dec_main): Likewise.
(xz_dec_init): Likewise.
(xz_dec_reset): Likewise.
(xz_dec_end): Likewise.
* util/import_gcry.py: Add CRC64 line.

12 years ago * grub-core/fs/ufs.c (grub_ufs_mtime) [MODE_UFS2]: Check mtime field
Vladimir 'phcoder' Serbinenko [Thu, 3 Nov 2011 14:00:45 +0000 (15:00 +0100)]
* grub-core/fs/ufs.c (grub_ufs_mtime) [MODE_UFS2]: Check mtime field
as well.

12 years ago Make reiserfs label retrieval similar to other *_label functions.
Vladimir 'phcoder' Serbinenko [Thu, 3 Nov 2011 13:57:34 +0000 (14:57 +0100)]
Make reiserfs label retrieval similar to other *_label functions.

* grub-core/fs/reiserfs.c (grub_reiserfs_superblock): New field label.
(REISERFS_MAX_LABEL_LENGTH): Removed.
(REISERFS_LABEL_OFFSET): Likewise.
(grub_reiserfs_label): Rewritten.

12 years ago * grub-core/fs/nilfs2.c (grub_nilfs2_mtime): Use correct superblock
Vladimir 'phcoder' Serbinenko [Thu, 3 Nov 2011 13:52:59 +0000 (14:52 +0100)]
* grub-core/fs/nilfs2.c (grub_nilfs2_mtime): Use correct superblock
field.

12 years ago * grub-core/fs/zfs/zfs.c (read_device): Support raidz3.
Vladimir 'phcoder' Serbinenko [Thu, 3 Nov 2011 06:29:35 +0000 (07:29 +0100)]
* grub-core/fs/zfs/zfs.c (read_device): Support raidz3.

12 years ago * grub-core/fs/zfs/zfs.c (read_device): Add ability to sustain a single
Vladimir 'phcoder' Serbinenko [Wed, 2 Nov 2011 22:28:25 +0000 (23:28 +0100)]
* grub-core/fs/zfs/zfs.c (read_device): Add ability to sustain a single
drive failure on both raidz and raidz2.

12 years ago Fix RAIDZ(2) for >= 5 devices.
Vladimir 'phcoder' Serbinenko [Wed, 2 Nov 2011 19:48:04 +0000 (20:48 +0100)]
Fix RAIDZ(2) for >= 5 devices.

* grub-core/fs/zfs/zfs.c (read_device): Fix length formula. Remove
asize argument. All users updated.

12 years ago Fix RAIDZ(2).
Vladimir 'phcoder' Serbinenko [Tue, 1 Nov 2011 19:05:28 +0000 (20:05 +0100)]
Fix RAIDZ(2).

* grub-core/fs/zfs/zfs.c (grub_zfs_device_desc): New member ashift.
(fill_vdev_info_real): Set ashift.
(read_device): Rewrite RAIDZ part based on reverse engineering.

12 years ago * grub-core/fs/btrfs.c (grub_btrfs_extent_read): Add sanity check and
Vladimir 'phcoder' Serbinenko [Mon, 31 Oct 2011 12:56:52 +0000 (13:56 +0100)]
* grub-core/fs/btrfs.c (grub_btrfs_extent_read): Add sanity check and
don't report potentially unavialiable fields in debug output.
(find_path): Fix double-free and memory leak.

12 years ago Read label on UFS1.
Vladimir 'phcoder' Serbinenko [Mon, 31 Oct 2011 09:52:39 +0000 (10:52 +0100)]
Read label on UFS1.

* grub-core/fs/ufs.c (grub_ufs_label): Remove MODE_UFS2 condition.
(grub_ufs_fs): Always set .label.

12 years ago Use shifts in UFS.
Vladimir 'phcoder' Serbinenko [Mon, 31 Oct 2011 09:50:43 +0000 (10:50 +0100)]
Use shifts in UFS.

* grub-core/fs/ufs.c (UFS_LOG_BLKSZ): New macro.
(grub_ufs_data): New field log2_blksz.
(grub_ufs_read_file): Use shifts.
(grub_ufs_mount): Check block size and logarithm it.

12 years ago * grub-core/fs/ufs.c (grub_ufs_lookup_symlink): Fix handling of
Vladimir 'phcoder' Serbinenko [Mon, 31 Oct 2011 09:40:30 +0000 (10:40 +0100)]
* grub-core/fs/ufs.c (grub_ufs_lookup_symlink): Fix handling of
long symlinks.

12 years ago Handle symlinks and long names on tar and cpio.
Vladimir 'phcoder' Serbinenko [Sun, 30 Oct 2011 22:06:25 +0000 (23:06 +0100)]
Handle symlinks and long names on tar and cpio.

* grub-core/fs/cpio.c (ATTR_TYPE): New definition.
(ATTR_FILE): Likewise.
(ATTR_DIR): Likewise.
(ATTR_LNK): Likewise.
(grub_cpio_data) [MODE_USTAR]: New fields linkname and linkname_alloc.
(grub_cpio_find_file): Fill mode, handle linkname field as well as
L and K entries.
(grub_cpio_mount): Zero-fill data.
(handle_symlink): New function.

12 years ago Fix iso9660 filename limitations and fix memory leaks.
Vladimir 'phcoder' Serbinenko [Sun, 30 Oct 2011 19:23:05 +0000 (20:23 +0100)]
Fix iso9660 filename limitations and fix memory leaks.

* grub-core/fs/iso9660.c (set_rockridge): Free sua at the end.
(grub_iso9660_iterate_dir): Fix slash handling in symlinks.

12 years ago Fix JFS file name length limitations.
Vladimir 'phcoder' Serbinenko [Sun, 30 Oct 2011 19:14:57 +0000 (20:14 +0100)]
Fix JFS file name length limitations.

* grub-core/fs/jfs.c (grub_jfs_inode): Fix in-place symlink length.
(grub_jfs_diropen): Fix maximum filename length.
(grub_jfs_getent): Fix filename length.
(grub_jfs_lookup_symlink): Fix size checks.

12 years ago * grub-core/loader/mips/linux.c (loongson_machtypes): Fix fuloong type
Vladimir 'phcoder' Serbinenko [Sun, 30 Oct 2011 18:30:04 +0000 (19:30 +0100)]
* grub-core/loader/mips/linux.c (loongson_machtypes): Fix fuloong type
string.

12 years ago Leverage BFS implementation to read AFS.
Vladimir 'phcoder' Serbinenko [Sun, 30 Oct 2011 15:10:18 +0000 (16:10 +0100)]
Leverage BFS implementation to read AFS.

* Makefile.util.def (libgrubmods): Add afs.c.
* grub-core/Makefile.core.def (afs): New module
* grub-core/fs/afs.c: New file.
* grub-core/fs/bfs.c [MODE_AFS]: Adapt for AFS.

12 years agoFix a mistake in previous commit
Vladimir 'phcoder' Serbinenko [Sun, 30 Oct 2011 13:25:53 +0000 (14:25 +0100)]
Fix a mistake in previous commit

12 years ago * grub-core/fs/bfs.c: MAcroify and add some necessary sanity checks.
Vladimir 'phcoder' Serbinenko [Sun, 30 Oct 2011 13:17:44 +0000 (14:17 +0100)]
* grub-core/fs/bfs.c: MAcroify and add some necessary sanity checks.

12 years ago * grub-core/fs/bfs.c: Run indent.
Vladimir 'phcoder' Serbinenko [Sun, 30 Oct 2011 12:27:53 +0000 (13:27 +0100)]
* grub-core/fs/bfs.c: Run indent.

12 years ago BFS implementation based on the specification.
Vladimir 'phcoder' Serbinenko [Sun, 30 Oct 2011 12:25:51 +0000 (13:25 +0100)]
BFS implementation based on the specification.

* grub-core/fs/bfs.c: New file.
* Makefile.util.def (libgrubmods): Add bfs.c.
* grub-core/Makefile.core.def (bfs): New module.

12 years ago * util/grub-fstest.c (cmd_cp): Clarify error message.
Vladimir 'phcoder' Serbinenko [Sun, 30 Oct 2011 12:18:22 +0000 (13:18 +0100)]
* util/grub-fstest.c (cmd_cp): Clarify error message.
(cmd_cmp): Likewise.

12 years ago * po/POTFILES.in: Regenerate because of the removal of afs, afs_be, befs
Yves Blusseau [Sun, 30 Oct 2011 10:16:23 +0000 (11:16 +0100)]
* po/POTFILES.in: Regenerate because of the removal of afs, afs_be, befs
    and befs_be.

12 years ago Remove afs and befs because of copyright problem.
Vladimir 'phcoder' Serbinenko [Sat, 29 Oct 2011 09:29:34 +0000 (11:29 +0200)]
Remove afs and befs because of copyright problem.

* grub-core/fs/afs.c: Removed.
* grub-core/fs/afs_be.c: Removed.
* grub-core/fs/befs.c: Removed.
* grub-core/fs/befs_be.c: Removed.
* Makefile.util.def (libgrubkern): Remove afs, afs_be, befs and befs_be.
* grub-core/Makefile.core.def (afs): Removed.
(afs_be): Likewise.
(befs): Likewise.
(befs_be): Likewise.

12 years ago Prefer rockridge over Joliet.
Vladimir 'phcoder' Serbinenko [Fri, 28 Oct 2011 14:26:17 +0000 (16:26 +0200)]
Prefer rockridge over Joliet.

* grub-core/fs/iso9660.c (grub_iso9660_mount): Move rockridge detection
to ...
(set_rockridge): ... here.
(grub_iso9660_mount): Check rockridge on the primary label when
discovering. Ignore Joliet if Rockridge is present.

12 years ago Use shifts in nilfs2.
Vladimir 'phcoder' Serbinenko [Fri, 28 Oct 2011 14:21:18 +0000 (16:21 +0200)]
Use shifts in nilfs2.

* grub-core/fs/nilfs2.c (LOG_INODE_SIZE): New definition.
(LOG_NILFS_DAT_ENTRY_SIZE): Likewise.
(grub_nilfs2_palloc_entries_per_group): Replace with ...
(grub_nilfs2_log_palloc_entries_per_group): ... this.
(grub_nilfs2_palloc_group): Use shifts and bitmasks.
(grub_nilfs2_entries_per_block): Replaced with ...
(grub_nilfs2_log_entries_per_block_log): ... this.
(grub_nilfs2_blocks_per_group): Replaced with ...
(grub_nilfs2_blocks_per_group_log): ... this.
(grub_nilfs2_blocks_per_desc_block): Replaced with ...
(grub_nilfs2_blocks_per_desc_block_log): ... this.
(grub_nilfs2_palloc_desc_block_offset): Replaced with ...
(grub_nilfs2_palloc_desc_block_offset_log): ... this.
(grub_nilfs2_palloc_entry_offset): Replaced ...
(grub_nilfs2_palloc_entry_offset_log): ... this. Use shifts.
(grub_nilfs2_dat_translate): Use shifts.
(grub_nilfs2_read_inode): Likewise.
(GRUB_MOD_INIT): Ensure that logs are correct.

12 years ago Use shifts in minix filesystem.
Vladimir 'phcoder' Serbinenko [Fri, 28 Oct 2011 14:09:20 +0000 (16:09 +0200)]
Use shifts in minix filesystem.

* grub-core/fs/minix.c (GRUB_MINIX_ZONESZ): Use log_block_size.
(GRUB_MINIX_ZONE2SECT): Likewise.
(grub_minix_data): Replace block_size with log_block_size.
(grub_minix_read_file): Use shifts.
(grub_minix_mount): Check block size and take a logarithm.

12 years ago Use shifts in squash4.
Vladimir 'phcoder' Serbinenko [Fri, 28 Oct 2011 14:05:16 +0000 (16:05 +0200)]
Use shifts in squash4.

* grub-core/fs/squash4.c (grub_squash_data): New field log2_blksz.
(squash_mount): Check block size and take logarithm.
(direct_read): Use shifts.

12 years ago Correct befs block counting logic.
Vladimir 'phcoder' Serbinenko [Fri, 28 Oct 2011 13:59:47 +0000 (15:59 +0200)]
Correct befs block counting logic.

* grub-core/fs/afs.c (GRUB_AFS_BLOCKS_PER_DI_RUN): Replaced with...
(GRUB_AFS_LOG_BLOCKS_PER_DI_RUN): ... this.
(GRUB_AFS_BLOCKRUN_LOG_SIZE): New definition.
(grub_afs_read_inode): Use block_shift.
(RANGE_SHIFT): New definition.
(grub_afs_read_block): Account for RANGE_SHIFT, emit errors on
unexpected conditions, use shifts and appropriate types.
(GRUB_MOD_INIT): Check the value of GRUB_AFS_BLOCKRUN_LOG_SIZE.

12 years ago * grub-core/disk/raid.c (scan_devices): Check partition.
Vladimir 'phcoder' Serbinenko [Fri, 28 Oct 2011 13:52:15 +0000 (15:52 +0200)]
* grub-core/disk/raid.c (scan_devices): Check partition.
* grub-core/disk/lvm.c (do_lvm_scan): Likewise.

12 years ago Support BFS (befs) UUID.
Vladimir 'phcoder' Serbinenko [Thu, 27 Oct 2011 18:58:52 +0000 (20:58 +0200)]
Support BFS (befs) UUID.

* grub-core/fs/afs.c (grub_afs_inode): Make small_data zero-size.
(grub_afs_small_data_element_header): New struct.
(grub_afs_read_inode): Read complete inode. Fix ino type while on it.
(grub_afs_read_attribute) [MODE_BFS]: New function.
(grub_afs_iterate_dir): Allocate for complete inode.
(grub_afs_mount): Likewise.
(grub_afs_uuid) [MODE_BFS]: New function.
(grub_afs_fs) [MODE_BFS]: Add .uuid.

12 years ago * grub-core/fs/zfs/zfs.c (read_device): Silence spurious warning.
Vladimir 'phcoder' Serbinenko [Thu, 27 Oct 2011 18:55:09 +0000 (20:55 +0200)]
* grub-core/fs/zfs/zfs.c (read_device): Silence spurious warning.
(zfs_unmount): Fix memory leak.

12 years ago Support NTFS reparse points.
Vladimir 'phcoder' Serbinenko [Thu, 27 Oct 2011 01:04:27 +0000 (03:04 +0200)]
Support NTFS reparse points.

* grub-core/fs/ntfs.c (list_file): Set symlink type when appropriate.
(symlink_descriptor): New struct.
(grub_ntfs_read_symlink): New function.
(grub_ntfs_iterate_dir): Use grub_ntfs_read_symlink.
(grub_ntfs_open): Likewise.

12 years ago * include/grub/ntfs.h: Add GRUB_NTFS_ prefix. All users updated.
Vladimir 'phcoder' Serbinenko [Thu, 27 Oct 2011 00:59:45 +0000 (02:59 +0200)]
* include/grub/ntfs.h: Add GRUB_NTFS_ prefix. All users updated.

12 years ago fstest xnu_uuid subcommand.
Vladimir 'phcoder' Serbinenko [Thu, 27 Oct 2011 00:58:32 +0000 (02:58 +0200)]
fstest xnu_uuid subcommand.

* grub-core/commands/xnu_uuid.c (libgrubkrn): Add
grub-core/commands/xnu_uuid.c.
* util/grub-fstest.c (CMD_XNU_UUID): New enum value.
(fstest): Handle xnu_uuid.
(options): Document xnu_uuid.
(argp_parser): Parse xnu_uuid.

12 years ago * grub-core/commands/xnu_uuid.c (grub_cmd_xnu_uuid): Support
Vladimir 'phcoder' Serbinenko [Thu, 27 Oct 2011 00:55:07 +0000 (02:55 +0200)]
* grub-core/commands/xnu_uuid.c (grub_cmd_xnu_uuid): Support
-l argument. Add newline at the end if printing.
(GRUB_MOD_INIT): Document -l.

12 years ago * grub-core/fs/nilfs2.c (grub_nilfs2_uuid): Add missing field length.
Vladimir 'phcoder' Serbinenko [Thu, 27 Oct 2011 00:52:54 +0000 (02:52 +0200)]
* grub-core/fs/nilfs2.c (grub_nilfs2_uuid): Add missing field length.

12 years ago ZFS multi-device and version 33 support.
Vladimir 'phcoder' Serbinenko [Thu, 27 Oct 2011 00:49:50 +0000 (02:49 +0200)]
ZFS multi-device and version 33 support.

* Makefile.util.def (libgrubkern): Add grub-core/fs/zfs/zfsinfo.c.
* grub-core/fs/zfs/zfs.c (grub_zfs_device_desc): New struct.
(grub_zfs_data): Add multidev-ice-related fields.
(zio_checksum_verify): Zero-pad printed values. Print checksum name.
(dva_get_offset): Make dva const.
(zfs_fetch_nvlist): New function.
(fill_vdev_info_real): Likewise.
(fill_vdev_info): Likewise.
(check_pool_label): Likewise.
(scan_disk): Likewise.
(scan_devices): Likewise.
(read_device): Likewise.
(read_dva): Likewise.
(zio_read_gang): Use read_dva.
(zio_read_data): Likewise.
(zap_leaf_lookup): Add missing endian conversion.
(zap_verify): Add missing endian conversion. All users updated.
(fzap_lookup): Likewise.
(fzap_iterate): Likewise.
(dnode_get_path): Handle SA bonus.
(nvlist_find_value): Make input const. All users updated.
(unmount_device): New function.
(zfs_unmount): Use unmount_device.
(zfs_mount): Use scan_disk.
(zfs_mtime): New function.
(grub_zfs_open): Handle system attributes.
(fill_fs_info): Likewise.
(grub_zfs_dir): Likewise.
(grub_zfs_fs): Add mtime.
* grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add missing return.
* include/grub/zfs/sa_impl.h (SA_TYPE_OFFSET): New definition.
(SA_MTIME_OFFSET): Likewise.
(SA_SYMLINK_OFFSET): Likewise.
* include/grub/zfs/zfs.h (SPA_VERSION): Increase to 33.
* util/grub-fstest.c (CMD_ZFSINFO): New enum value.
(fstest): Support zfsinfo.
(argp_parser): Likewise.

12 years agoSmall multidevice fix
Vladimir 'phcoder' Serbinenko [Thu, 27 Oct 2011 00:36:10 +0000 (02:36 +0200)]
Small multidevice fix

12 years agoSupport version 33 including symlinks
Vladimir 'phcoder' Serbinenko [Thu, 27 Oct 2011 00:04:04 +0000 (02:04 +0200)]
Support version 33 including symlinks

12 years ago * include/grub/datetime.h (grub_datetime2unixtime): Fix off-by-one
Vladimir 'phcoder' Serbinenko [Wed, 26 Oct 2011 17:27:36 +0000 (19:27 +0200)]
* include/grub/datetime.h (grub_datetime2unixtime): Fix off-by-one
error.

12 years agomerge mainline into zfs
Vladimir 'phcoder' Serbinenko [Wed, 26 Oct 2011 17:26:24 +0000 (19:26 +0200)]
merge mainline into zfs

12 years agoBump spa version
Vladimir 'phcoder' Serbinenko [Wed, 26 Oct 2011 17:11:10 +0000 (19:11 +0200)]
Bump spa version

12 years ago ZFS fixes.
Vladimir 'phcoder' Serbinenko [Wed, 26 Oct 2011 15:32:21 +0000 (17:32 +0200)]
ZFS fixes.

* grub-core/fs/zfs/zfs.c (fzap_iterate): Fix handling of indexes
sharing the same block. Iterate over correct number of indices.
(dnode_get_path): Handle symlinks correctly.

12 years ago * grub-core/fs/jfs.c (grub_jfs_sblock): Fix offset to volname.
Vladimir 'phcoder' Serbinenko [Tue, 25 Oct 2011 22:35:41 +0000 (00:35 +0200)]
* grub-core/fs/jfs.c (grub_jfs_sblock): Fix offset to volname.

12 years ago Read label on HFS+.
Vladimir 'phcoder' Serbinenko [Tue, 25 Oct 2011 22:32:17 +0000 (00:32 +0200)]
Read label on HFS+.

* grub-core/fs/hfsplus.c (grub_hfsplus_cmp_catkey_id): New function.
(grub_hfsplus_btree_search): Fix types.
(grub_hfsplus_label): Implement.

12 years ago * grub-core/fs/ntfs.c (grub_ntfs_uuid): Fix a memory leak.
Vladimir 'phcoder' Serbinenko [Tue, 25 Oct 2011 22:29:46 +0000 (00:29 +0200)]
* grub-core/fs/ntfs.c (grub_ntfs_uuid): Fix a memory leak.

12 years ago * grub-core/fs/fat.c (grub_fat_uuid): Make uppercase to match Linux.
Vladimir 'phcoder' Serbinenko [Tue, 25 Oct 2011 19:53:57 +0000 (21:53 +0200)]
* grub-core/fs/fat.c (grub_fat_uuid): Make uppercase to match Linux.

12 years ago Fix symlink handling on iso9660.
Vladimir 'phcoder' Serbinenko [Tue, 25 Oct 2011 19:52:48 +0000 (21:52 +0200)]
Fix symlink handling on iso9660.

* grub-core/fs/iso9660.c (grub_fshelp_node): Remove dir_off. Add symlink
All users updated.
(grub_iso9660_susp_iterate): Accept zero-size iterate.
(grub_iso9660_read_symlink): Moved most of code ...
(grub_iso9660_iterate_dir): ... here. Fill node->symlink.

12 years ago * grub-core/loader/i386/bsd.c (grub_netbsd_add_boot_disk_and_wedge):
Vladimir 'phcoder' Serbinenko [Tue, 25 Oct 2011 16:20:39 +0000 (18:20 +0200)]
* grub-core/loader/i386/bsd.c (grub_netbsd_add_boot_disk_and_wedge):
Use union to avoid breaking strict-aliasing rules.

12 years ago Support multi-extent iso files.
Vladimir 'phcoder' Serbinenko [Tue, 25 Oct 2011 16:18:58 +0000 (18:18 +0200)]
Support multi-extent iso files.

* grub-core/fs/iso9660.c (grub_iso9660_data): Remove first_sector.
Add node.
(grub_fshelp_node): Revamp. All users updated.
(FLAG_*): New enum.
(read_node): New function.
(grub_iso9660_susp_iterate): Use read_node. Receive a node as argument.
All users updated.
(grub_iso9660_mount): Don't attempt to read sua when there is none.
(get_node_size): New function.
(grub_iso9660_iterate_dir): Use read_node. Agglomerate multi-extent
entries.
Fix memory leak on . and ..
(grub_iso9660_read): Use read_node.
(grub_iso9660_close): Free node.

12 years ago Fix tar 4G limit and handle paths containing dot.
Vladimir 'phcoder' Serbinenko [Tue, 25 Oct 2011 16:12:36 +0000 (18:12 +0200)]
Fix tar 4G limit and handle paths containing dot.

* grub-core/fs/cpio.c (grub_cpio_data): Use grub_off_t for offsets.
(canonicalize): New function.
(grub_cpio_find_file): Use canonicalize. Store offs in
grub_disk_addr_t.
(grub_cpio_dir): Use grub_disk_addr_t.
(grub_cpio_open): Likewise.

12 years ago Fix handling of uncompressed blocks on squashfs and break 4G limit.
Vladimir 'phcoder' Serbinenko [Tue, 25 Oct 2011 16:09:00 +0000 (18:09 +0200)]
Fix handling of uncompressed blocks on squashfs and break 4G limit.

* grub-core/fs/squash4.c (grub_squash_super): Add block_size. Remove
unused flags.
(grub_squash_inode): Add long_file and block_size.
(grub_squash_cache_inode): New struct.
(grub_squash_dirent): Make types into enum.
(SQUASH_TYPE_LONG_REGULAR): New type.
(grub_squash_frag_desc): Add field size.
(SQUASH_BLOCK_FLAGS): New enum.
(grub_squash_data): Use grub_squash_cache_inode.
(grub_fshelp_node): Make ino_chunk 64-bit.
(read_chunk): Minor argument change. All users updated.
(squash_mount): Use correct le_to_cpu.
(grub_squash_open): Handle LONG_REGULAR.
(direct_read): New function.
(grub_squash_read_data): Handle blocks correctly.

12 years ago * grub-core/kern/disk.c (grub_disk_read_small): Fix memory leak.
Vladimir 'phcoder' Serbinenko [Tue, 25 Oct 2011 16:01:57 +0000 (18:01 +0200)]
* grub-core/kern/disk.c (grub_disk_read_small): Fix memory leak.

12 years ago * grub-core/fs/romfs.c (grub_romfs_open): Add missing return.
Vladimir 'phcoder' Serbinenko [Tue, 25 Oct 2011 15:38:22 +0000 (17:38 +0200)]
* grub-core/fs/romfs.c (grub_romfs_open): Add missing return.

12 years ago Fix 2G limit on ZFS.
Vladimir 'phcoder' Serbinenko [Mon, 24 Oct 2011 19:33:35 +0000 (21:33 +0200)]
Fix 2G limit on ZFS.

* grub-core/fs/zfs/zfs.c (zio_checksum_verify): Use more appropriate
types.
(uberblock_verify): Likewise.
(dmu_read): Likewise.
(grub_zfs_read): Likewise. Remove invalid cast.

12 years ago * grub-core/fs/jfs.c (grub_jfs_blkno): Use more appropriate types.
Vladimir 'phcoder' Serbinenko [Mon, 24 Oct 2011 15:02:02 +0000 (17:02 +0200)]
* grub-core/fs/jfs.c (grub_jfs_blkno): Use more appropriate types.
(grub_jfs_blkno): Fix incorrect shift.
(grub_jfs_read_file): Use more appropriate types.

12 years ago Support triple indirect on minix2 and minix3.
Vladimir 'phcoder' Serbinenko [Mon, 24 Oct 2011 14:16:28 +0000 (16:16 +0200)]
Support triple indirect on minix2 and minix3.

* grub-core/fs/minix.c (grub_minix_inode) [MODE_MINIX2 || MODE_MINIX3]:
Declare triple_indir_zone.
(grub_minix_get_file_block) [MODE_MINIX2 || MODE_MINIX3]: Handle triple
indirect.

12 years ago Minix FS fixes.
Vladimir 'phcoder' Serbinenko [Mon, 24 Oct 2011 08:45:47 +0000 (10:45 +0200)]
Minix FS fixes.

* grub-core/fs/minix.c (GRUB_MINIX_INODE_SIZE): Size is always 32-bit.
(grub_minix_inode) [!MODE_MINIX2 && !MODE_MINIX3]: Make size 32-bit.
Rename ctime to mtime. All users updated.
(grub_minix_get_file_block): Fix types and double indirect computations.

12 years ago * grub-core/fs/fat.c (grub_fat_label) [MODE_EXFAT]: Set *label to 0
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 23:31:06 +0000 (01:31 +0200)]
* grub-core/fs/fat.c (grub_fat_label) [MODE_EXFAT]: Set *label to 0
if no label is found.
(grub_fat_iterate_dir): Fix file size type.
(grub_fat_iterate_dir): Likewise.

12 years ago * grub-core/lib/reed_solomon.c (gf_invert): Declare as const and
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:55:38 +0000 (23:55 +0200)]
* grub-core/lib/reed_solomon.c (gf_invert): Declare as const and
save some space.
* include/grub/offsets.h (GRUB_KERNEL_I386_PC_RAW_SIZE): Decrease.
(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): Likewise.

12 years ago * util/import_gcry.py: Automatically fix camellia.c and camellia.h.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:40:53 +0000 (23:40 +0200)]
* util/import_gcry.py: Automatically fix camellia.c and camellia.h.

12 years ago * util/import_gcry.py: Accept space between # and include.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:39:00 +0000 (23:39 +0200)]
* util/import_gcry.py: Accept space between # and include.

12 years ago * grub-core/lib/setjmp.S [__ia64__]: Include ./ia64/longjmp.S.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:34:30 +0000 (23:34 +0200)]
* grub-core/lib/setjmp.S [__ia64__]: Include ./ia64/longjmp.S.

12 years ago Fine grainely disable warnings on lexer. Remove Wno-error on it.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:32:06 +0000 (23:32 +0200)]
Fine grainely disable warnings on lexer. Remove Wno-error on it.

* grub-core/Makefile.core.def (normal): Remove -Wno-error.
* grub-core/script/lexer.c: Declare yytext_ptr to avoid having
yylex_strncpy.
* grub-core/script/yylex.l: Add fine-grained #pragma.

12 years ago * grub-core/lib/posix_wrap/string.h (memcpy) [GRUB_UTIL]:
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:28:23 +0000 (23:28 +0200)]
* grub-core/lib/posix_wrap/string.h (memcpy) [GRUB_UTIL]:
New inline function.
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (memcpy) [GRUB_UTIL]:
Likewise.
(memset) [GRUB_UTIL]: Likewise.
(memcmp) [GRUB_UTIL]: Likewise.

12 years ago * include/grub/misc.h (grub_memcpy): Declare grub_memcpy with static
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:25:06 +0000 (23:25 +0200)]
* include/grub/misc.h (grub_memcpy): Declare grub_memcpy with static
inline function rather than a define.

12 years ago * util/grub-setup.c: Add missing include.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:22:38 +0000 (23:22 +0200)]
* util/grub-setup.c: Add missing include.

12 years ago * util/ieee1275/grub-ofpathname.c: Add missing include.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:20:11 +0000 (23:20 +0200)]
* util/ieee1275/grub-ofpathname.c: Add missing include.

12 years ago * grub-core/kern/i386/pc/startup.S (grub_exit): Add missing zeroing-out.
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 21:04:57 +0000 (23:04 +0200)]
* grub-core/kern/i386/pc/startup.S (grub_exit): Add missing zeroing-out.
* grub-core/lib/i386/reboot_trampoline.S (grub_reboot_start):
Likewise.

12 years ago * grub-core/io/lzopio.c (test_header): Fix incorrect memcmp instead of
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 20:55:32 +0000 (22:55 +0200)]
* grub-core/io/lzopio.c (test_header): Fix incorrect memcmp instead of
grub_memcmp usage.

12 years ago * util/grub-install.in: Add datarootdir as per automake manual
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 20:53:21 +0000 (22:53 +0200)]
* util/grub-install.in: Add datarootdir as per automake manual
suggestion.
* util/grub-mknetdir.in: Likewise.

12 years ago * util/grub.d/10_hurd.in: Add datarootdir as per automake manual
Vladimir 'phcoder' Serbinenko [Sun, 23 Oct 2011 20:40:26 +0000 (22:40 +0200)]
* util/grub.d/10_hurd.in: Add datarootdir as per automake manual
suggestion.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/10_netbsd.in: Likewise.
* util/grub.d/10_windows.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.

12 years ago Remove redundant grub_kernel_image_size.
Vladimir 'phcoder' Serbinenko [Thu, 20 Oct 2011 06:13:00 +0000 (08:13 +0200)]
Remove redundant grub_kernel_image_size.

* grub-core/kern/i386/coreboot/init.c (grub_machine_init): Use
_edata and _start.
* grub-core/kern/i386/coreboot/startup.S: Move multiboot header after
the small code. It moves it only by few bytes but simplifies the code.
* grub-core/kern/i386/pc/init.c (grub_machine_init): Use _edata and
_start.
* grub-core/kern/i386/pc/startup.S: Use _edata and _start.
(grub_kernel_image_size): Removed.
* grub-core/kern/i386/qemu/startup.S: Use _edata and _start.
(grub_kernel_image_size): Removed.
[APPLE_CC]: Remove apple compiler support. i386-qemu port can't be
compiled with Apple toolchain.
* grub-core/kern/sparc64/ieee1275/crt0.S: Remove leftover fields.
* include/grub/i386/pc/kernel.h (grub_kernel_image_size): Removed.
* include/grub/i386/qemu/kernel.h (grub_kernel_image_size): Removed.
(grub_total_module_size): Likewise.
* include/grub/offsets.h (GRUB_KERNEL_I386_PC_KERNEL_IMAGE_SIZE):
Removed.
(GRUB_KERNEL_I386_PC_COMPRESSED_SIZE): Put it lower.
(GRUB_KERNEL_I386_PC_INSTALL_DOS_PART): Likewise.
(GRUB_KERNEL_I386_PC_INSTALL_BSD_PART): Likewise.
(GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY): Likewise.
(GRUB_KERNEL_I386_QEMU_KERNEL_IMAGE_SIZE): Removed.
(GRUB_KERNEL_SPARC64_IEEE1275_KERNEL_IMAGE_SIZE): Likewise.
(GRUB_KERNEL_SPARC64_IEEE1275_COMPRESSED_SIZE): Likewise.
* include/grub/sparc64/ieee1275/kernel.h (grub_kernel_image_size):
Removed.
(grub_total_module_size): Removed.
* util/grub-mkimage.c (image_target_desc): Remove image_size.
(image_targets): Likewise.
Set .compressed_size to no field on sparc.
(generate_image): Remove kernel_image_size handling.

12 years ago* grub-core/bus/usb/uhci.c (grub_uhci_setup_transfer): Fix possible
Szymon Janc [Wed, 19 Oct 2011 21:11:48 +0000 (23:11 +0200)]
* grub-core/bus/usb/uhci.c (grub_uhci_setup_transfer): Fix possible
NULL pointer dereference.

12 years ago Removed unused GRUB_BOOT_VERSION. Check for kernel version is better
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 21:01:44 +0000 (23:01 +0200)]
Removed unused GRUB_BOOT_VERSION. Check for kernel version is better
done with a dedicated section.

* grub-core/boot/sparc64/ieee1275/boot.S: Remove GRUB_BOOT_VERSION.
Ensure the correct position of boot_path.
* grub-core/kern/i386/efi/startup.S: Remove GRUB_BOOT_VERSION.
* grub-core/kern/i386/pc/startup.S: Likewise. Ensure correct position of
other fields.
* grub-core/kern/x86_64/efi/startup.S: Remove GRUB_BOOT_VERSION.
* include/grub/boot.h: Removed. All references removed.
* include/grub/sparc64/ieee1275/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
Removed.
(GRUB_BOOT_MACHINE_BOOT_DEVPATH): Make it lower.

12 years ago * util/grub-install.in: Declare IEEE1275 as able to find out the disk
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 18:35:41 +0000 (20:35 +0200)]
* util/grub-install.in: Declare IEEE1275 as able to find out the disk
name.

12 years ago * grub-core/kern/main.c (grub_set_prefix_and_root): Init prefix.
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 18:30:06 +0000 (20:30 +0200)]
* grub-core/kern/main.c (grub_set_prefix_and_root): Init prefix.

12 years ago * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 18:28:09 +0000 (20:28 +0200)]
* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
Don't add the bogus brackets.

12 years ago ExFAT support.
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 18:19:25 +0000 (20:19 +0200)]
ExFAT support.

* Makefile.util.def (libgrubmods.a): Add grub-core/fs/exfat.c.
* grub-core/Makefile.core.def (exfat): New module.
* grub-core/fs/exfat.c: New file.
* grub-core/fs/fat.c (GRUB_FAT_DIR_ENTRY_SIZE): Removed.
(GRUB_FAT_ATTR_*): Make into an enum.
(GRUB_FAT_ATTR_LONG_NAME) [MODE_EXFAT]: Removed.
(GRUB_FAT_ATTR_VALID) [MODE_EXFAT]: Remove GRUB_FAT_ATTR_VOLUME_ID.
(GRUB_FAT_ATTR_VOLUME_ID) [MODE_EXFAT]: Removed.
(GRUB_FAT_MAXFILE): Removed.
(grub_exfat_bpb) [MODE_EXFAT]: New struct.
(grub_current_fat_bpb_t): New type.
(grub_fat_dir_entry) [MODE_EXFAT]: New struct.
(grub_fat_dir_node) [MODE_EXFAT]: New struct.
(grub_fat_dir_node_t): New type.
(grub_fat_data) [MODE_EXFAT]: Remove root_sector and num_root_sectors.
(fat_log2) [MODE_EXFAT]: Removed.
(grub_fat_mount): Use grub_current_fat_bpb_t. Add some sanity checks.
(grub_fat_mount) [MODE_EXFAT]: Handle ExFAT.
(grub_fat_iterate_dir) [MODE_EXFAT]: New function.
(grub_fat_find_dir) [MODE_EXFAT]: Handle ExFAT.
(grub_fat_label) [MODE_EXFAT]: New function.
(grub_fat_fs) [MODE_EXFAT]: Set name to "exfat" and
reserved_first_sector to 0.

12 years ago Move grub_reboot out of the kernel.
Vladimir 'phcoder' Serbinenko [Wed, 19 Oct 2011 14:53:18 +0000 (16:53 +0200)]
Move grub_reboot out of the kernel.

* grub-core/Makefile.core.def (reboot): Add platform-specific files.
* grub-core/kern/efi/efi.c (grub_reboot): Moved to ...
* grub-core/lib/efi/reboot.c: ... here.
* grub-core/kern/i386/efi/startup.S: Remove including of realmode.S.
* grub-core/kern/i386/ieee1275/startup.S: Likewise.
* grub-core/kern/i386/pc/startup.S (grub_exit): Inline cold_reboot.
* grub-core/kern/i386/realmode.S (grub_reboot): Moved to...
* grub-core/lib/i386/reboot_trampoline.S: ... here.
* grub-core/kern/ieee1275/openfw.c (grub_reboot): Moved to...
* grub-core/lib/ieee1275/reboot.c: ... here.
* grub-core/kern/mips/arc/init.c (grub_reboot): Moved to...
* grub-core/lib/mips/arc/reboot.c: ... here.
* grub-core/kern/mips/loongson/init.c (grub_reboot): Moved to...
* grub-core/lib/mips/loongson/reboot.c: ...here.
* grub-core/kern/mips/qemu_mips/init.c (grub_reboot): Moved to...
* grub-core/lib/mips/qemu_mips/reboot.c: ... here.
* include/grub/emu/misc.h (grub_reboot): New function declaration.
* include/grub/i386/reboot.h: New file.
* include/grub/mips/loongson/ec.h: Fix includes.
* include/grub/mips/qemu_mips/kernel.h (grub_reboot): Removed.
* include/grub/misc.h (grub_reboot): Don't mark as kernel function.
* grub-core/lib/i386/reboot.c: New file.

12 years ago Make grub_prefix into module to fix the arbitrary limit and save
Vladimir 'phcoder' Serbinenko [Tue, 18 Oct 2011 13:21:51 +0000 (15:21 +0200)]
Make grub_prefix into module to fix the arbitrary limit and save
some space.

* grub-core/kern/emu/main.c (grub_prefix): Removed.
* grub-core/kern/i386/coreboot/startup.S (grub_prefix): Likewise.
* grub-core/kern/i386/efi/startup.S (grub_prefix): Likewise.
* grub-core/kern/i386/ieee1275/startup.S (grub_prefix): Likewise.
* grub-core/kern/i386/pc/startup.S (grub_prefix): Likewise.
* grub-core/kern/i386/qemu/startup.S (grub_prefix): Likewise.
* grub-core/kern/ia64/efi/startup.S (grub_prefix): Likewise.
* grub-core/kern/mips/startup.S (grub_prefix): Likewise.
* grub-core/kern/powerpc/ieee1275/startup.S (grub_prefix): Likewise.
* grub-core/kern/sparc64/ieee1275/crt0.S (grub_prefix): Likewise.
* grub-core/kern/x86_64/efi/startup.S (grub_prefix): Likewise.
* include/grub/ia64/efi/kernel.h: Removed.
* include/grub/kernel.h: New module type OBJ_TYPE_PREFIX.
(grub_prefix): Removed.
* include/grub/offsets.h (GRUB_KERNEL_I386_PC_PREFIX): Removed.
(GRUB_KERNEL_I386_PC_PREFIX_END): Likewise.
(GRUB_KERNEL_I386_QEMU_PREFIX): Likewise.
(GRUB_KERNEL_I386_QEMU_PREFIX_END): Likewise.
(GRUB_KERNEL_SPARC64_IEEE1275_PREFIX): Likewise.
(GRUB_KERNEL_SPARC64_IEEE1275_PREFIX_END): Likewise.
(GRUB_KERNEL_POWERPC_IEEE1275_PREFIX): Likewise.
(GRUB_KERNEL_POWERPC_IEEE1275_PREFIX_END): Likewise.
(GRUB_KERNEL_MIPS_LOONGSON_PREFIX): Likewise.
(GRUB_KERNEL_MIPS_LOONGSON_PREFIX_END): Likewise.
(GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX): Likewise.
(GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX_END): Likewise.
(GRUB_KERNEL_MIPS_ARC_PREFIX): Likewise.
(GRUB_KERNEL_MIPS_ARC_PREFIX_END): Likewise.
(GRUB_KERNEL_I386_EFI_PREFIX): Likewise.
(GRUB_KERNEL_I386_EFI_PREFIX_END): Likewise.
(GRUB_KERNEL_IA64_EFI_PREFIX): Likewise.
(GRUB_KERNEL_IA64_EFI_PREFIX_END): Likewise.
(GRUB_KERNEL_X86_64_EFI_PREFIX): Likewise.
(GRUB_KERNEL_X86_64_EFI_PREFIX_END): Likewise.
(GRUB_KERNEL_I386_COREBOOT_PREFIX): Likewise.
(GRUB_KERNEL_I386_COREBOOT_PREFIX_END): Likewise.
(GRUB_KERNEL_I386_MULTIBOOT_PREFIX): Likewise.
(GRUB_KERNEL_I386_MULTIBOOT_PREFIX_END): Likewise.
(GRUB_KERNEL_I386_IEEE1275_PREFIX): Likewise.
(GRUB_KERNEL_I386_IEEE1275_PREFIX_END): Likewise.
(GRUB_KERNEL_MACHINE_PREFIX): Likewise.
(GRUB_KERNEL_MACHINE_PREFIX_END): Likewise.
* grub-core/kern/main.c (grub_set_prefix_and_root): Retrieve grub_prefix
from module.
* util/grub-mkimage.c (image_target_desc): Removed prefix and
prefix_end.
(image_targets): Likewise.
(generate_image): Put prefix as a module.

12 years ago Replace grub_module_iterate with FOR_MODULES.
Vladimir 'phcoder' Serbinenko [Sun, 16 Oct 2011 13:23:29 +0000 (15:23 +0200)]
Replace grub_module_iterate with FOR_MODULES.

* grub-core/disk/memdisk.c (GRUB_MOD_INIT): Switched to new interface.
* grub-core/kern/efi/efi.c (grub_arch_modules_addr): Renamed to...
(grub_efi_modules_addr): ...this.
* grub-core/kern/efi/init.c (grub_modbase): New variable.
(grub_efi_init): Set grub_modbase.
* grub-core/kern/emu/main.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
* grub-core/kern/i386/coreboot/init.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* grub-core/kern/i386/pc/init.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* grub-core/kern/ieee1275/init.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* grub-core/kern/main.c (grub_module_iterate): Remove.
(grub_modules_get_end): Use grub_modbase.
(grub_load_modules): Use FOR_MODULES.
(grub_load_config): Likewise.
* grub-core/kern/mips/arc/init.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* grub-core/kern/mips/loongson/init.c (grub_arch_modules_addr): Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* grub-core/kern/mips/qemu_mips/init.c (grub_arch_modules_addr):
Removed.
(grub_modbase): New variable.
(grub_machine_init): Set grub_modbase.
* include/grub/efi/efi.h (grub_efi_modules_addr): New declaration.
* include/grub/kernel.h (grub_arch_modules_addr): Removed.
(grub_module_iterate): Likewise.
(grub_modbase): New variable declaration.
(FOR_MODULES): New macro.

12 years ago * configure.ac: Check for __ctzdi2 and __ctzsi2.
Vladimir 'phcoder' Serbinenko [Sun, 16 Oct 2011 13:15:35 +0000 (15:15 +0200)]
* configure.ac: Check for __ctzdi2 and __ctzsi2.
* include/grub/libgcc.h: Include __ctzdi2 and __ctzsi2 if present.

12 years ago Fix few obvious type discrepancies.
Vladimir 'phcoder' Serbinenko [Sun, 16 Oct 2011 09:57:48 +0000 (11:57 +0200)]
Fix few obvious type discrepancies.

* grub-core/fs/affs.c (grub_affs_read_file): Use grub_off_t for offset.
* grub-core/fs/afs.c (grub_afs_read_file): Likewise.
* grub-core/fs/fshelp.c (grub_fshelp_find_file): Remove leftover
variable.
* grub-core/fs/hfs.c (grub_hfs_read_file): Use grub_off_t for offset
and connected types.
* grub-core/fs/nilfs2.c (grub_nilfs2_read_file): Use grub_off_t for
offset.
(grub_nilfs2_iterate_dir): Use grub_off_t for fpos.
* grub-core/fs/sfs.c (grub_sfs_read_file): Use grub_off_t for offset.
* grub-core/fs/ufs.c (grub_ufs_read_file): Use grub_off_t for offset
and connected types.

12 years ago Fix python 3.x incompatibilities.
Vladimir 'phcoder' Serbinenko [Sun, 16 Oct 2011 09:53:27 +0000 (11:53 +0200)]
Fix python 3.x incompatibilities.

* gentpl.py: Put brackets around print strings.
* util/import_gcry.py: Open explicitly as utf-8.
Use in instead of has_key.

12 years ago * grub-core/fs/xfs.c (grub_xfs_inode): New field fork_offset.
Vladimir 'phcoder' Serbinenko [Sun, 16 Oct 2011 09:48:54 +0000 (11:48 +0200)]
* grub-core/fs/xfs.c (grub_xfs_inode): New field fork_offset.
(GRUB_XFS_INO_AGBITS): Make into inline function.
(GRUB_XFS_INO_INOINAG): Likewise.
(GRUB_XFS_INO_AG): Likewise.
(GRUB_XFS_FSB_TO_BLOCK): Likewise.
(GRUB_XFS_EXTENT_OFFSET): Likewise.
(GRUB_XFS_EXTENT_BLOCK): Likewise.
(GRUB_XFS_EXTENT_SIZE): Likewise.
(GRUB_XFS_ROUND_TO_DIRENT): Likewise.
(GRUB_XFS_NEXT_DIRENT): Likewise.
(grub_xfs_read_block): Rewrite the btree parsing. Fixes invalid BMAP.
(grub_xfs_read_file): Fix offset type.

12 years ago2011-10-15 Robert Millan <rmh@gnu.org>
Robert Millan [Sat, 15 Oct 2011 16:37:55 +0000 (18:37 +0200)]
2011-10-15  Robert Millan  <rmh@gnu.org>

        * util/getroot.c (grub_util_get_grub_dev): Fix OS selection #ifdefs.

12 years ago2011-10-15 Robert Millan <rmh@gnu.org>
Robert Millan [Sat, 15 Oct 2011 11:33:41 +0000 (13:33 +0200)]
2011-10-15  Robert Millan  <rmh@gnu.org>

        Fix build problem on FreeBSD and GNU/kFreeBSD.

        * util/getroot.c [__FreeBSD_kernel__]: Include `<sys/mount.h>'.

12 years ago Fix overflow with >2GiB file on HFS+. >4GiB wasn't tested.
Vladimir 'phcoder' Serbinenko [Fri, 14 Oct 2011 20:41:21 +0000 (22:41 +0200)]
Fix overflow with >2GiB file on HFS+. >4GiB wasn't tested.

* grub-core/fs/hfsplus.c (grub_hfsplus_btree): Use more appropriate
types.
(grub_hfsplus_btree_recoffset): Likewise.
(grub_hfsplus_btree_recptr): Likewise.
(grub_hfsplus_find_block): Likewise.
(grub_hfsplus_btree_search): Likewise.
(grub_hfsplus_read_block): Likewise.
(grub_hfsplus_read_file): Likewise.
(grub_hfsplus_mount): Likewise.
(grub_hfsplus_btree_iterate_node): Likewise.
(grub_hfsplus_btree_search): Likewise.
(grub_hfsplus_iterate_dir): Likewise.
(grub_hfsplus_read): A small code simplification.

12 years ago * grub-core/kern/emu/hostdisk.c
Vladimir 'phcoder' Serbinenko [Fri, 14 Oct 2011 17:20:44 +0000 (19:20 +0200)]
* grub-core/kern/emu/hostdisk.c
(convert_system_partition_to_system_disk): Don't assume that children
of mapper nodes are mapper nodes.

12 years ago * grub-core/lib/posix_wrap/ctype.h (isxdigit): Use grub_isxdigit.
Vladimir 'phcoder' Serbinenko [Fri, 14 Oct 2011 17:16:37 +0000 (19:16 +0200)]
* grub-core/lib/posix_wrap/ctype.h (isxdigit): Use grub_isxdigit.
* include/grub/misc.h (grub_isxdigit): New function.
* grub-core/video/colors.c (my_isxdigit): Removed. All users
switched to grub_isxdigit.
* grub-core/term/serial.c (grub_serial_find): Fix in case of port
number starting with a letter.

12 years ago2011-10-09 Robert Millan <rmh@gnu.org>
Robert Millan [Sun, 9 Oct 2011 19:13:00 +0000 (21:13 +0200)]
2011-10-09  Robert Millan  <rmh@gnu.org>

        LVM support for FreeBSD and GNU/kFreeBSD.

        * util/lvm.c (grub_util_lvm_isvolume): Enable on FreeBSD and
        GNU/kFreeBSD.
        (LVM_DEV_MAPPER_STRING): Move from here ...
        * include/grub/util/lvm.h (LVM_DEV_MAPPER_STRING): ... to here.
        * util/getroot.c: Include `<grub/util/lvm.h>'.
        (grub_util_get_dev_abstraction): Enable
        grub_util_biosdisk_is_present() on FreeBSD and GNU/kFreeBSD.
        Check for LVM abstraction on FreeBSD and GNU/kFreeBSD.
        (grub_util_get_grub_dev): Replace "/dev/mapper/" with
        `LVM_DEV_MAPPER_STRING'.  Enable LVM and mdRAID only on platforms that
        support it.
        * util/grub-setup.c (main): Check for LVM also on FreeBSD and
        GNU/kFreeBSD.
        * util/grub.d/10_kfreebsd.in: Load `geom_linux_lvm' kernel module
        when LVM abstraction is required for ${GRUB_DEVICE}.

12 years agoAdd support for LZO compression in GRUB:
Szymon Janc [Thu, 6 Oct 2011 18:45:14 +0000 (20:45 +0200)]
Add support for LZO compression in GRUB:
- import of minilzo library,
- LZO decompression for btrfs,
- lzop files decompression.

* grub-core/io/lzopio.c: New file.
* grub-core/lib/adler32.c: Likewise.
* grub-core/lib/minilzo/lzoconf.h: Likewise.
* grub-core/lib/minilzo/lzodefs.h: Likewise.
* grub-core/lib/minilzo/minilzo.c: Likewise.
* grub-core/lib/minilzo/minilzo.h: Likewise.
* Makefile.util.def (libgrubmods.a): Add grub-core/io/lzopio.c,
grub-core/lib/adler32.c, grub-core/io/lzopio.c,
grub-core/lib/minilzo/minilzo.c to common.
* Makefile.util.def (libgrubmods.a): Add flags required by minilzo to
cflags in cppflags.
* grub-core/Makefile.core.def (btrfs): Likewise.
* grub-core/Makefile.core.def (lzopio): New module.
(adler32): Likewise.
* grub-core/fs/btrfs.c: Include minilzo.h.
(GRUB_BTRFS_COMPRESSION_LZO): New define.
(GRUB_BTRFS_LZO_BLOCK_SIZE): Likewise.
(GRUB_BTRFS_LZO_BLOCK_MAX_CSIZE): Likewise.
(grub_btrfs_lzo_decompress): New function.
(grub_btrfs_extent_read): Add support for LZO compression type.
* include/grub/types.h (GRUB_UCHAR_MAX): New define.
(GRUB_USHRT_MAX): Likewise.
(GRUB_UINT_MAX): Likewise.
* grub-core/lib/posix_wrap/limits.h (USHRT_MAX): Likewise.
(UINT_MAX): Likewise.
(CHAR_BIT): Likewise.
* grub-core/lib/posix_wrap/sys/types.h (ULONG_MAX): Moved to
grub-core/lib/posix_wrap/limits.h
(UCHAR_MAX): Likewise.
* include/grub/file.h (grub_file_filter_id): New compression filter
GRUB_FILE_FILTER_LZOPIO.
* include/grub/file.h (grub_file_filter_id): Set
GRUB_FILE_FILTER_LZOPIO as GRUB_FILE_FILTER_COMPRESSION_LAST.
* include/grub/types.h (grub_get_unaligned16): New function.
(grub_get_unaligned32): Likewise.
(grub_get_unaligned64): Likewise.
* util/import_gcry.py (cryptolist): Add adler32.