From add30adb7d2e662a95870ee427e0fb6ad9fde8c4 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Wed, 23 Jun 2010 21:02:12 +0000 Subject: [PATCH] ext2 magic is stored in little-endian format, not big-endian format. Signed-off-by: Mark Cave-Ayland git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@797 f158a5a8-5612-0410-a976-696ce0be7e32 --- fs/ext2/ext2_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext2/ext2_utils.c b/fs/ext2/ext2_utils.c index 35beb46..2d9c473 100644 --- a/fs/ext2/ext2_utils.c +++ b/fs/ext2/ext2_utils.c @@ -20,7 +20,7 @@ int ext2_probe(int fd, llong offset) seek_io(fd, 2 * 512 + offset); read_io(fd, super, sizeof (*super)); - if (__be16_to_cpu(super->s_magic) != EXT2_SUPER_MAGIC) { + if (__le16_to_cpu(super->s_magic) != EXT2_SUPER_MAGIC) { free(super); return 0; }