summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/UefiDebugLibStdErr
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:54:05 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commit2f88bd3a1296c522317f1c21377876de63de5be7 (patch)
treeba47875489cc5698061275a495983e9dea3be098 /MdePkg/Library/UefiDebugLibStdErr
parent1436aea4d5707e672672a11bda72be2c63c936c3 (diff)
downloadedk2-2f88bd3a1296c522317f1c21377876de63de5be7.tar.gz
edk2-2f88bd3a1296c522317f1c21377876de63de5be7.tar.bz2
edk2-2f88bd3a1296c522317f1c21377876de63de5be7.zip
MdePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'MdePkg/Library/UefiDebugLibStdErr')
-rw-r--r--MdePkg/Library/UefiDebugLibStdErr/DebugLib.c59
-rw-r--r--MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c34
2 files changed, 41 insertions, 52 deletions
diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
index fcfdafede0..5b28cd10ae 100644
--- a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
+++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c
@@ -6,7 +6,6 @@
**/
-
#include <Uefi.h>
#include <Library/DebugLib.h>
@@ -21,15 +20,14 @@
//
#define MAX_DEBUG_MESSAGE_LENGTH 0x100
-
//
// VA_LIST can not initialize to NULL for all compiler, so we use this to
// indicate a null VA_LIST
//
-VA_LIST mVaListNull;
+VA_LIST mVaListNull;
-extern BOOLEAN mPostEBS;
-extern EFI_SYSTEM_TABLE *mDebugST;
+extern BOOLEAN mPostEBS;
+extern EFI_SYSTEM_TABLE *mDebugST;
/**
Prints a debug message to the debug output device if the specified error level is enabled.
@@ -54,14 +52,13 @@ DebugPrint (
...
)
{
- VA_LIST Marker;
+ VA_LIST Marker;
VA_START (Marker, Format);
DebugVPrint (ErrorLevel, Format, Marker);
VA_END (Marker);
}
-
/**
Prints a debug message to the debug output device if the specified
error level is enabled base on Null-terminated format string and a
@@ -81,13 +78,13 @@ DebugPrint (
**/
VOID
DebugPrintMarker (
- IN UINTN ErrorLevel,
- IN CONST CHAR8 *Format,
- IN VA_LIST VaListMarker,
- IN BASE_LIST BaseListMarker
+ IN UINTN ErrorLevel,
+ IN CONST CHAR8 *Format,
+ IN VA_LIST VaListMarker,
+ IN BASE_LIST BaseListMarker
)
{
- CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
+ CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
if (!mPostEBS) {
//
@@ -120,7 +117,6 @@ DebugPrintMarker (
}
}
-
/**
Prints a debug message to the debug output device if the specified
error level is enabled.
@@ -139,15 +135,14 @@ DebugPrintMarker (
VOID
EFIAPI
DebugVPrint (
- IN UINTN ErrorLevel,
- IN CONST CHAR8 *Format,
- IN VA_LIST VaListMarker
+ IN UINTN ErrorLevel,
+ IN CONST CHAR8 *Format,
+ IN VA_LIST VaListMarker
)
{
DebugPrintMarker (ErrorLevel, Format, VaListMarker, NULL);
}
-
/**
Prints a debug message to the debug output device if the specified
error level is enabled.
@@ -168,15 +163,14 @@ DebugVPrint (
VOID
EFIAPI
DebugBPrint (
- IN UINTN ErrorLevel,
- IN CONST CHAR8 *Format,
- IN BASE_LIST BaseListMarker
+ IN UINTN ErrorLevel,
+ IN CONST CHAR8 *Format,
+ IN BASE_LIST BaseListMarker
)
{
DebugPrintMarker (ErrorLevel, Format, mVaListNull, BaseListMarker);
}
-
/**
Prints an assert message containing a filename, line number, and description.
This may be followed by a breakpoint or a dead loop.
@@ -234,15 +228,14 @@ DebugAssert (
//
// Generate a Breakpoint, DeadLoop, or NOP based on PCD settings
//
- if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {
+ if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {
CpuBreakpoint ();
- } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {
+ } else if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {
CpuDeadLoop ();
}
}
}
-
/**
Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
@@ -273,10 +266,9 @@ DebugClearMemory (
//
// SetMem() checks for the the ASSERT() condition on Length and returns Buffer
//
- return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));
+ return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue));
}
-
/**
Returns TRUE if ASSERT() macros are enabled.
@@ -293,10 +285,9 @@ DebugAssertEnabled (
VOID
)
{
- return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);
+ return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);
}
-
/**
Returns TRUE if DEBUG() macros are enabled.
@@ -313,10 +304,9 @@ DebugPrintEnabled (
VOID
)
{
- return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);
+ return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);
}
-
/**
Returns TRUE if DEBUG_CODE() macros are enabled.
@@ -333,10 +323,9 @@ DebugCodeEnabled (
VOID
)
{
- return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);
+ return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);
}
-
/**
Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
@@ -353,7 +342,7 @@ DebugClearMemoryEnabled (
VOID
)
{
- return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
+ return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);
}
/**
@@ -368,8 +357,8 @@ DebugClearMemoryEnabled (
BOOLEAN
EFIAPI
DebugPrintLevelEnabled (
- IN CONST UINTN ErrorLevel
+ IN CONST UINTN ErrorLevel
)
{
- return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) != 0);
+ return (BOOLEAN)((ErrorLevel & PcdGet32 (PcdFixedDebugPrintErrorLevel)) != 0);
}
diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c b/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c
index b4ac17cf55..103f9f03be 100644
--- a/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c
+++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c
@@ -15,16 +15,16 @@
//
// BOOLEAN value to indicate if it is at the post ExitBootServices pahse
//
-BOOLEAN mPostEBS = FALSE;
+BOOLEAN mPostEBS = FALSE;
-static EFI_EVENT mExitBootServicesEvent;
+static EFI_EVENT mExitBootServicesEvent;
//
// Pointer to SystemTable
// This library instance may have a cycle consume with UefiBootServicesTableLib
// because of the constructors.
//
-EFI_SYSTEM_TABLE *mDebugST;
+EFI_SYSTEM_TABLE *mDebugST;
/**
This routine sets the mPostEBS for exit boot servies true
@@ -37,8 +37,8 @@ EFI_SYSTEM_TABLE *mDebugST;
VOID
EFIAPI
ExitBootServicesCallback (
- EFI_EVENT Event,
- VOID* Context
+ EFI_EVENT Event,
+ VOID *Context
)
{
mPostEBS = TRUE;
@@ -57,20 +57,20 @@ ExitBootServicesCallback (
**/
EFI_STATUS
EFIAPI
-DxeDebugLibConstructor(
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+DxeDebugLibConstructor (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
mDebugST = SystemTable;
SystemTable->BootServices->CreateEvent (
- EVT_SIGNAL_EXIT_BOOT_SERVICES,
- TPL_NOTIFY,
- ExitBootServicesCallback,
- NULL,
- &mExitBootServicesEvent
- );
+ EVT_SIGNAL_EXIT_BOOT_SERVICES,
+ TPL_NOTIFY,
+ ExitBootServicesCallback,
+ NULL,
+ &mExitBootServicesEvent
+ );
return EFI_SUCCESS;
}
@@ -86,9 +86,9 @@ DxeDebugLibConstructor(
**/
EFI_STATUS
EFIAPI
-DxeDebugLibDestructor(
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+DxeDebugLibDestructor (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
if (mExitBootServicesEvent != NULL) {