Skip to content

Commit

Permalink
No it works
Browse files Browse the repository at this point in the history
  • Loading branch information
kuqin12 committed Dec 18, 2023
1 parent fc7d780 commit f30f7c5
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions AdvLoggerPkg/Library/AdvancedLoggerLib/AdvancedLoggerCommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ AdvancedLoggerMemoryLoggerWrite (

if (LoggerInfo != NULL) {
MessagePrefix = (CHAR8 *)FixedPcdGetPtr (PcdAdvancedLoggerMessagePrefix);
MessagePrefixSize = FixedPcdGetSize (PcdAdvancedLoggerMessageBaseArmPrefix);
MessagePrefixSize = FixedPcdGetSize (PcdAdvancedLoggerMessagePrefix);

if ((MessagePrefix == NULL) || (MessagePrefixSize <= 1) || (MessagePrefix[MessagePrefixSize - 1] != '\0')) {
// Do not take null pointers, strings with only a null terminator, or string without terminator
MessagePrefix = NULL;
MessagePrefixSize = 0;
} else {
// Remove the null terminator from the size
MessagePrefixSize --;
MessagePrefixSize--;
}

NumberOfBytes += MessagePrefixSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
[Pcd]
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerBase ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerHdwPortDebugPrintErrorLevel ## SOMETIMES_CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessagePrefix ## CONSUMES

[Depex]
TRUE
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerPages
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerBase
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerHdwPortDebugPrintErrorLevel
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessagePrefix

[FeaturePcd]
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerLocator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

[Pcd]
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerHdwPortDebugPrintErrorLevel ## SOMETIMES_CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessageMmCorePrefix ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessagePrefix ## CONSUMES

[Depex]
TRUE
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerBase
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerPages
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerHdwPortDebugPrintErrorLevel
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessageMmCoreArmPrefix
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessagePrefix

[Depex]
TRUE
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
[Pcd]
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerBase ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerHdwPortDebugPrintErrorLevel ## SOMETIMES_CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessagePei64Prefix ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessagePrefix ## CONSUMES
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerPreMemPages ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerPages ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerHdwPortDebugPrintErrorLevel ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessagePrefix ## CONSUMES
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@

[Pcd]
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerHdwPortDebugPrintErrorLevel ## SOMETIMES_CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessagePrefix ## CONSUMES
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerPreMemPages ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerPages ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerHdwPortDebugPrintErrorLevel ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessagePrefix ## CONSUMES

[BuildOptions]
*_*_*_CC_FLAGS = -D ADVANCED_LOGGER_SEC=1
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@

[Pcd]
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerHdwPortDebugPrintErrorLevel ## SOMETIMES_CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerMessagePrefix ## CONSUMES

0 comments on commit f30f7c5

Please sign in to comment.