diff --git a/Include/Protocol/OcLog.h b/Include/Protocol/OcLog.h index 18627971..623b2033 100755 --- a/Include/Protocol/OcLog.h +++ b/Include/Protocol/OcLog.h @@ -15,8 +15,14 @@ #ifndef OC_LOG_PROTOCOL_H #define OC_LOG_PROTOCOL_H -// The defines for the log flags. +/// +/// Current supported log protocol revision. +/// +#define OC_LOG_REVISION 0x01000A +/// +/// The defines for the log flags. +/// #define OC_LOG_DISABLE 0 #define OC_LOG_ENABLE BIT0 #define OC_LOG_CONSOLE BIT1 diff --git a/Library/OcDebugLogLib/OcDebugLogLib.c b/Library/OcDebugLogLib/OcDebugLogLib.c index e8321dda..83f94987 100755 --- a/Library/OcDebugLogLib/OcDebugLogLib.c +++ b/Library/OcDebugLogLib/OcDebugLogLib.c @@ -65,7 +65,7 @@ DebugPrint ( (VOID **) &mOcLog ); - if (EFI_ERROR (Status)) { + if (EFI_ERROR (Status) || mOcLog->Revision != OC_LOG_REVISION) { mOcLog = NULL; } } diff --git a/Library/OcDebugLogLib/OcLogInternal.h b/Library/OcDebugLogLib/OcLogInternal.h index abf5d2d9..ab515d00 100755 --- a/Library/OcDebugLogLib/OcLogInternal.h +++ b/Library/OcDebugLogLib/OcLogInternal.h @@ -18,7 +18,6 @@ #include #include -#define OC_LOG_REVISION 0x01000A #define OC_LOG_BUFFER_SIZE BASE_512KB #define OC_LOG_LINE_BUFFER_SIZE BASE_1KB #define OC_LOG_FILE_PATH_BUFFER_SIZE 256