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:
parent
3b801603d5
commit
d70af616c2
3 changed files with 10 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue