mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
ext2 magic is stored in little-endian format, not big-endian format.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@797 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Mark Cave-Ayland
parent
0dddb61de8
commit
add30adb7d
@@ -20,7 +20,7 @@ int ext2_probe(int fd, llong offset)
|
|||||||
seek_io(fd, 2 * 512 + offset);
|
seek_io(fd, 2 * 512 + offset);
|
||||||
read_io(fd, super, sizeof (*super));
|
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);
|
free(super);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user