aboutsummaryrefslogtreecommitdiff
path: root/util/cbfstool/eventlog.h
diff options
context:
space:
mode:
authorWojciech Macek <wmacek@google.com>2023-02-23 09:33:06 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-03-02 13:05:35 +0000
commit9edaccd922af346bba59ce32668fd91f051af1d6 (patch)
treedebcd0d15179a1faae6ab2768b5ea75eedc06816 /util/cbfstool/eventlog.h
parentfd8664e178094896bce8b91ef19709d692ecbf1b (diff)
util/cbfstool/eventlog: Use LocalTime or UTC timestamps
Add a new flag "--utc" to allow the user to choose if elogtool should print timestamps in Local Time or in UTC. It is useful for generating automated crash reports including all system logs when users are located in various regions (timezones). Add information about timezone to timestamps printed on the console. Signed-off-by: Wojciech Macek <wmacek@google.com> Change-Id: I30ba0e17c67ab4078e3a7137ece69009a63d68fa Reviewed-on: https://review.coreboot.org/c/coreboot/+/73201 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
Diffstat (limited to 'util/cbfstool/eventlog.h')
-rw-r--r--util/cbfstool/eventlog.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/util/cbfstool/eventlog.h b/util/cbfstool/eventlog.h
index 1911b77e82..6cc39fbf88 100644
--- a/util/cbfstool/eventlog.h
+++ b/util/cbfstool/eventlog.h
@@ -8,7 +8,13 @@
struct event_header;
struct buffer;
-void eventlog_print_event(const struct event_header *event, int count);
+enum eventlog_timezone {
+ EVENTLOG_TIMEZONE_LOCALTIME = 0,
+ EVENTLOG_TIMEZONE_UTC,
+};
+
+void eventlog_print_event(const struct event_header *event, int count,
+ enum eventlog_timezone tz);
int eventlog_init_event(const struct buffer *buf, uint8_t type,
const void *data, int data_size);