On Sun, 2007-03-18 at 01:18 +0000, Yoshinori K. Okuji wrote: > > Log message: > 2007-03-18 Yoshinori K. Okuji <[EMAIL PROTECTED]> > > * 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.
> diff -u -r1.13 -r1.14 > --- grub2/fs/ext2.c 2006/06/04 15:56:54 1.13 > +++ grub2/fs/ext2.c 2007/03/18 01:18:39 1.14 > @@ -294,7 +294,7 @@ > 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; If the inode size is not 128 bytes, why do we still read `sizeof (struct grub_ext2_inode)' bytes from disk? What is the layout of a non-128-byte inode? -Hollis _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel