elogtool: add "clear" command
Adds "clear" command to cbfsutil/elogtool tool. "clear" clears the RW_ELOG region by using either: * flashrom if no file is provided * or using file write if an input file is provided. The region is filled with ELOG_TYPE_EOL. And a ELOG_TYPE_LOG_CLEAR event is inserted. Additionally, it does a minor cleanup to command "list", like: * use buffer_end() * add "list" to the cmds struct * and make elog_read() very similar to elog_write() Usage: $ elogtool clear BUG=b:172210863 TEST=elogtool clear && elogtool list elogtool clear -f invalid.raw elogtool clear -f valid.raw Change-Id: Ia28a6eb34c82103ab078a0841b022e2e5e430585 Signed-off-by: Ricardo Quesada <ricardoq@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/56883 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
This commit is contained in:
committed by
Furquan Shaikh
parent
6db0f04fa2
commit
49a96a9463
@@ -3,8 +3,13 @@
|
||||
#ifndef EVENTLOG_H_
|
||||
#define EVENTLOG_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct event_header;
|
||||
struct buffer;
|
||||
|
||||
void eventlog_print_event(const struct event_header *event, int count);
|
||||
int eventlog_init_event(const struct buffer *buf, uint8_t type,
|
||||
const void *data, int data_size);
|
||||
|
||||
#endif // EVENTLOG_H_
|
||||
|
Reference in New Issue
Block a user