diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2021-03-08 10:46:58 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-10 04:38:44 +0000 |
commit | 357ce5349a2e88bed9e9d773719e5119ac76ef49 (patch) | |
tree | e814f48733ce2dc4c503a8f64b1896abf5bb49cd /util/ec_panicinfo.h | |
parent | 819adb4fa98f5d32a373ebd63e668b1c1bc5b121 (diff) | |
download | chrome-ec-357ce5349a2e88bed9e9d773719e5119ac76ef49.tar.gz |
util/ec_parse_panicinfo: Parse older structures
For devices on older FW branches, we need to be able to parse
panicinfo even if the size of the structures don't match.
Realign trailer (struct_size and magic) for that purpose.
Also, add WARNING/ERROR tags to messages so that we can
grep for those in a test.
Make a similar change in ectool (use the return value that
indicates the size).
BUG=b:182087232
TEST=make build/bds/util/ec_parse_panicinfo
TEST=build/bds/util/ec_parse_panicinfo < \
./upload_file_eccrash-857e3693bfce1e1f.eccrash
BRANCH=none
Change-Id: I97650aa3085e753b0a2256058402e33d11238f52
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738577
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'util/ec_panicinfo.h')
-rw-r--r-- | util/ec_panicinfo.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/ec_panicinfo.h b/util/ec_panicinfo.h index f70c58e59f..c61cf797e6 100644 --- a/util/ec_panicinfo.h +++ b/util/ec_panicinfo.h @@ -14,6 +14,6 @@ * @param pdata Panic information to print * @return 0 if success or non-zero error code if error. */ -int parse_panic_info(const struct panic_data *pdata); +int parse_panic_info(const char *data, size_t size); #endif /* EC_PANICINFO_H */ |