From d972515e608e4898c4a34a5895648135d4ac5aec Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 19 Feb 2025 11:04:34 -0500 Subject: Save the debug and error logs in mok-variables This changes our debug and error logging to save the entire logs into mok-variables as "shim-dbg.txt" and "shim-log.txt". Signed-off-by: Peter Jones --- include/console.h | 1 + include/errlog.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/console.h b/include/console.h index 7ac4e113..c90e3e71 100644 --- a/include/console.h +++ b/include/console.h @@ -98,6 +98,7 @@ extern UINT32 verbose; #ifndef SHIM_UNIT_TEST #define dprint_(fmt, ...) ({ \ UINTN __dprint_ret = 0; \ + log_debug_print((fmt), ##__VA_ARGS__); \ if (verbose) \ __dprint_ret = console_print((fmt), ##__VA_ARGS__); \ __dprint_ret; \ diff --git a/include/errlog.h b/include/errlog.h index bf59b2f9..b9f089b8 100644 --- a/include/errlog.h +++ b/include/errlog.h @@ -15,6 +15,8 @@ extern VOID LogHexdump_(const char *file, int line, const char *func, const void *data, size_t sz); extern VOID PrintErrors(VOID); extern VOID ClearErrors(VOID); +extern void save_logs(void); +extern UINTN EFIAPI log_debug_print(const CHAR16 *fmt, ...); #endif /* !ERRLOG_H_ */ // vim:fenc=utf-8:tw=75:noet -- cgit v1.2.3