diff options
author | Evan Benn <evanbenn@chromium.org> | 2022-07-25 13:55:15 +1000 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-08-02 23:57:37 +0000 |
commit | 81069f0c65bafe094b0cd5b46acab608f86bcaae (patch) | |
tree | 26af8b903680c69bab9bf57a9815548361ed424c /util | |
parent | dfbcf63302599b72f68a27656d4c617e45c3c06a (diff) | |
download | flashrom-81069f0c65bafe094b0cd5b46acab608f86bcaae.tar.gz flashrom-81069f0c65bafe094b0cd5b46acab608f86bcaae.tar.bz2 flashrom-81069f0c65bafe094b0cd5b46acab608f86bcaae.zip |
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>
Diffstat (limited to 'util')
-rw-r--r-- | util/flashrom_tester/src/tests.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/flashrom_tester/src/tests.rs b/util/flashrom_tester/src/tests.rs index 8d5f19e8..7c6b8e8c 100644 --- a/util/flashrom_tester/src/tests.rs +++ b/util/flashrom_tester/src/tests.rs @@ -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(()) |