CloverBootloader/rEFIt_UEFI/Platform/BootLog.h

75 lines
1.2 KiB
C
Raw Normal View History

/*
Headers collection for procedures
*/
#ifndef __BOOTLOG__H__
#define __BOOTLOG__H__
#ifdef __cplusplus
extern "C" {
#endif
#include <Uefi/UefiBaseType.h>
2020-10-03 19:02:31 +02:00
#include <Protocol/SimpleFileSystem.h> // for EFI_FILE*
2020-04-16 11:09:22 +02:00
//#define SAFE_LOG_SIZE 80
//#define MSG_LOG_SIZE (256 * 1024)
2020-10-03 19:02:31 +02:00
#define PREBOOT_LOG_new L"misc\\preboot.log"
#define LEGBOOT_LOG_new L"misc\\legacy_boot.log"
#define BOOT_LOG_new L"misc\\boot.log"
#define SYSTEM_LOG_new L"misc\\system.log"
#define DEBUG_LOG_new L"misc\\debug.log"
//#define PREWAKE_LOG L"misc\\prewake.log"
2020-04-16 11:09:22 +02:00
2020-10-03 19:02:31 +02:00
void
InitBooterLog (void);
EFI_STATUS
SetupBooterLog (
BOOLEAN AllowGrownSize
);
EFI_STATUS
SaveBooterLog (
2020-10-03 19:02:31 +02:00
const EFI_FILE* BaseDir OPTIONAL,
const CHAR16 *FileName
);
#ifdef _MSC_VER
#define __attribute__(x)
#endif
2020-10-03 19:02:31 +02:00
void
EFIAPI
DebugLog (
IN INTN DebugMode,
2020-03-26 13:59:20 +01:00
IN CONST CHAR8 *FormatString, ...) __attribute__((format(printf, 2, 3)));
/** Prints series of bytes. */
2020-10-03 19:02:31 +02:00
void
PrintBytes (
2020-10-03 19:02:31 +02:00
IN void *Bytes,
IN UINTN Number
);
/*
* OpenCore
*/
// This use the EDK format
2020-10-03 19:02:31 +02:00
void EFIAPI DebugLogForOC(IN INTN DebugLevel, IN CONST CHAR8 *FormatString, ...);
#ifdef __cplusplus
} // extern "C"
#endif
#endif