[U-Boot] [PATCH] EXT2FS: fix inode size for ext2fs rev#0

Wolfgang Denk
2009-12-04T23:46:36Z

Dear Michael Brandt,

In message <4B0938F7.8080402@emsyso.de> you wrote:
> From: Michael Brandt <Michael.Brandt@emsyso.de>
>
> extfs.c assumes that there is always a valid inode_size field in the
> superblock. But this is not true for ext2fs rev 0. Such ext2fs images are for
> instance generated by genext2fs. Symptoms on ARM machines are messages like:
> "raise: Signal # 8 caught"
> This fix checks for rev 0 and uses then 128 bytes as inode size.
>
> Signed-off-by: Michael Brandt <Michael.Brandt@emsyso.de>
> ---
> fs/ext2/ext2fs.c | 20 +++++++++++++-------
> 1 files changed, 13 insertions(+), 7 deletions(-)

Tested on TQM5200S.

Applied to "master", thanks.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
After a time, you may find that "having" is not so pleasing a thing,
after all, as "wanting." It is not logical, but it is often true.
-- Spock, "Amok Time", stardate 3372.7