* grub-core/fs/ext2.c (grub_ext4_find_leaf): MAke buf as pointer to

properly aligned memory.
	(grub_ext2_read_block): Ensure buffer alignment.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-12-13 01:58:35 +01:00
parent 20993fbb9f
commit 812e249302
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2011-12-13 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/ext2.c (grub_ext4_find_leaf): MAke buf as pointer to
properly aligned memory.
(grub_ext2_read_block): Ensure buffer alignment.
2011-12-13 Vladimir Serbinenko <phcoder@gmail.com> 2011-12-13 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/romfs.c (grub_romfs_iterate_dir): Properly align * grub-core/fs/romfs.c (grub_romfs_iterate_dir): Properly align

View file

@ -337,7 +337,7 @@ grub_ext2_blockgroup (struct grub_ext2_data *data, int group,
} }
static struct grub_ext4_extent_header * static struct grub_ext4_extent_header *
grub_ext4_find_leaf (struct grub_ext2_data *data, char *buf, grub_ext4_find_leaf (struct grub_ext2_data *data, grub_properly_aligned_t *buf,
struct grub_ext4_extent_header *ext_block, struct grub_ext4_extent_header *ext_block,
grub_uint32_t fileblock) grub_uint32_t fileblock)
{ {
@ -387,7 +387,7 @@ grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
if (grub_le_to_cpu32(inode->flags) & EXT4_EXTENTS_FLAG) if (grub_le_to_cpu32(inode->flags) & EXT4_EXTENTS_FLAG)
{ {
char buf[EXT2_BLOCK_SIZE(data)]; GRUB_PROPERLY_ALIGNED_ARRAY (buf, EXT2_BLOCK_SIZE(data));
struct grub_ext4_extent_header *leaf; struct grub_ext4_extent_header *leaf;
struct grub_ext4_extent *ext; struct grub_ext4_extent *ext;
int i; int i;