2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>

* fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
    superblock instead of the structure size to compute an
    offset. This fixes the problem that GRUB could not read a
    filesystem when inode size is different from 128-byte.
This commit is contained in:
okuji 2007-03-18 01:18:39 +00:00
parent 3b801603d5
commit d70af616c2
3 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
* fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
superblock instead of the structure size to compute an
offset. This fixes the problem that GRUB could not read a
filesystem when inode size is different from 128-byte.
2007-03-05 Marco Gerards <marco@gnu.org>
* normal/main.c (read_config_file): When "menu" is not set, create

View file

@ -88,10 +88,10 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of `long', as computed by sizeof. */
/* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of `void *', as computed by sizeof. */
/* The size of a `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
/* Define it to either start or _start */

View file

@ -294,7 +294,7 @@ grub_ext2_read_inode (struct grub_ext2_data *data,
if (grub_disk_read (data->disk,
((grub_le_to_cpu32 (blkgrp.inode_table_id) + blkno)
<< LOG2_EXT2_BLOCK_SIZE (data)),
sizeof (struct grub_ext2_inode) * blkoff,
grub_le_to_cpu16 (sblock->inode_size) * blkoff,
sizeof (struct grub_ext2_inode), (char *) inode))
return grub_errno;