1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-28 15:33:42 +02:00

flashrom_tester: Parse fmap header as little endian

The fmap header was incorrectly parsed as big endian.

BUG=b:240097529
BRANCH=None
TEST=/usr/bin/flashrom_tester --debug :lib: host Coreboot_ELOG_sanity

Change-Id: Ia683ce7a6ce3bc009218c300abb9c3a16ea06a6d
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66119
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Evan Benn 2022-07-25 13:55:15 +10:00 committed by Anastasia Klimchuk
parent dfbcf63302
commit 81069f0c65

View File

@ -253,7 +253,7 @@ fn elog_sanity_test(env: &mut TestEnv) -> TestResult {
return Err("ELOG contained no data".into());
}
let data = fs::read(ELOG_FILE)?;
if u32::from_be_bytes(data[0..4].try_into()?) != 0x474f4c45 {
if u32::from_le_bytes(data[0..4].try_into()?) != 0x474f4c45 {
return Err("ELOG had bad magic number".into());
}
Ok(())