/* Copyright 2016 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * * Standalone utility to parse EC panicinfo. */ #include "compile_time_macros.h" #include #include #include int main(int argc, char *argv[]) { /* * panic_data size could change with time, as new architecture are * added (or, less likely, removed). */ const size_t max_size = 4096; BUILD_ASSERT(max_size > sizeof(struct panic_data) * 2); /* * Provide a minimal help message. */ if (argc > 1) { printf("Usage: cat | 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 " "