Skip to content

Commit

Permalink
Modify AdvancedLoggerDxelib
Browse files Browse the repository at this point in the history
  • Loading branch information
VivianNK committed Aug 13, 2024
1 parent cf4b663 commit 29bd4ef
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions AdvLoggerPkg/Library/AdvancedLoggerLib/Dxe/AdvancedLoggerLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ AdvancedLoggerWrite (
NULL,
(VOID **)&mLoggerProtocol
);

if (!EFI_ERROR (Status)) {
if ((mLoggerProtocol->Signature != ADVANCED_LOGGER_PROTOCOL_SIGNATURE) ||
(mLoggerProtocol->Version != ADVANCED_LOGGER_PROTOCOL_VERSION))
{
ASSERT (mLoggerProtocol->Signature == ADVANCED_LOGGER_PROTOCOL_SIGNATURE);
ASSERT (mLoggerProtocol->Version == ADVANCED_LOGGER_PROTOCOL_VERSION);
Status = EFI_NOT_FOUND;
}
}

if (EFI_ERROR (Status)) {
mLoggerProtocol = NULL;
Status = gBS->LocateProtocol (
Expand All @@ -76,9 +87,6 @@ AdvancedLoggerWrite (
if (EFI_ERROR (Status)) {
mDebugPortProtocol = NULL;
}
} else {
ASSERT (mLoggerProtocol->Signature == ADVANCED_LOGGER_PROTOCOL_SIGNATURE);
ASSERT (mLoggerProtocol->Version == ADVANCED_LOGGER_PROTOCOL_VERSION);
}
}

Expand Down

0 comments on commit 29bd4ef

Please sign in to comment.