diff options
Diffstat (limited to 'util/ec_parse_panicinfo.c')
-rw-r--r-- | util/ec_parse_panicinfo.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/util/ec_parse_panicinfo.c b/util/ec_parse_panicinfo.c index a3fefcf7b5..3a2da4590a 100644 --- a/util/ec_parse_panicinfo.c +++ b/util/ec_parse_panicinfo.c @@ -22,6 +22,19 @@ int main(int argc, char *argv[]) BUILD_ASSERT(sizeof(pdata) > sizeof(struct panic_data)*2); + /* + * Provide a minimal help message. + */ + if (argc > 1) { + printf("Usage: cat <PANIC_BLOB_PATH> | ec_parse_panicinfo\n"); + printf("Print the plain text panic info from a raw EC panic " + "data blob.\n\n"); + printf("Example:\n"); + printf("ec_parse_panicinfo " + "</sys/kernel/debug/cros_ec/panicinfo\n"); + return 1; + } + while (1) { read = fread(&pdata[size], 1, sizeof(pdata)-size, stdin); if (read < 0) { |