EmulatorPkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the EmulatorPkg 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: Ray Ni <ray.ni@intel.com>
This commit is contained in:
Michael Kubacki
2021-12-05 14:53:57 -08:00
committed by mergify[bot]
parent e7108d0e96
commit a550d468a6
111 changed files with 6170 additions and 6345 deletions

View File

@@ -18,15 +18,15 @@
#include <Guid/GlobalVariable.h>
#include <Guid/ImageAuthentication.h>
BOOLEAN mSecureBootDisabled = FALSE;
BOOLEAN mStopRedfishService = FALSE;
BOOLEAN mSecureBootDisabled = FALSE;
BOOLEAN mStopRedfishService = FALSE;
EFI_STATUS
EFIAPI
LibStopRedfishService (
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType
);
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType
);
/**
Return the credential for accessing to Redfish servcice.
@@ -41,10 +41,10 @@ LibStopRedfishService (
**/
EFI_STATUS
GetRedfishCredential (
OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,
OUT CHAR8 **UserId,
OUT CHAR8 **Password
)
OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,
OUT CHAR8 **UserId,
OUT CHAR8 **Password
)
{
UINTN UserIdSize;
UINTN PasswordSize;
@@ -59,14 +59,16 @@ GetRedfishCredential (
//
UserIdSize = AsciiStrSize ((CHAR8 *)PcdGetPtr (PcdRedfishServieUserId));
PasswordSize = AsciiStrSize ((CHAR8 *)PcdGetPtr (PcdRedfishServiePassword));
if (UserIdSize == 0 || PasswordSize == 0) {
if ((UserIdSize == 0) || (PasswordSize == 0)) {
DEBUG ((DEBUG_ERROR, "Incorrect string of UserID or Password for REdfish service.\n"));
return EFI_INVALID_PARAMETER;
}
*UserId = AllocateZeroPool (UserIdSize);
if (*UserId == NULL) {
return EFI_OUT_OF_RESOURCES;
}
CopyMem (*UserId, (CHAR8 *)PcdGetPtr (PcdRedfishServieUserId), UserIdSize);
*Password = AllocateZeroPool (PasswordSize);
@@ -110,11 +112,11 @@ LibCredentialGetAuthInfo (
OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,
OUT CHAR8 **UserId,
OUT CHAR8 **Password
)
)
{
EFI_STATUS Status;
EFI_STATUS Status;
if (This == NULL || AuthMethod == NULL || UserId == NULL || Password == NULL) {
if ((This == NULL) || (AuthMethod == NULL) || (UserId == NULL) || (Password == NULL)) {
return EFI_INVALID_PARAMETER;
}
@@ -124,7 +126,7 @@ LibCredentialGetAuthInfo (
if (mSecureBootDisabled) {
Status = LibStopRedfishService (This, ServiceStopTypeSecureBootDisabled);
if (EFI_ERROR (Status) && Status != EFI_UNSUPPORTED) {
if (EFI_ERROR (Status) && (Status != EFI_UNSUPPORTED)) {
DEBUG ((DEBUG_ERROR, "SecureBoot has been disabled, but failed to stop RedfishService - %r\n", Status));
return Status;
}
@@ -159,9 +161,9 @@ LibCredentialGetAuthInfo (
EFI_STATUS
EFIAPI
LibStopRedfishService (
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType
)
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType
)
{
if (ServiceStopType >= ServiceStopTypeMax) {
return EFI_INVALID_PARAMETER;
@@ -193,8 +195,10 @@ LibStopRedfishService (
mStopRedfishService = TRUE;
DEBUG ((DEBUG_INFO, "EFI Redfish service is stopped without Redfish service stop type!!\n"));
}
return EFI_SUCCESS;
}
/**
Notification of Exit Boot Service.
@@ -204,7 +208,7 @@ VOID
EFIAPI
LibCredentialExitBootServicesNotify (
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This
)
)
{
LibStopRedfishService (This, ServiceStopTypeExitBootService);
}
@@ -218,15 +222,15 @@ VOID
EFIAPI
LibCredentialEndOfDxeNotify (
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This
)
)
{
EFI_STATUS Status;
UINT8 *SecureBootVar;
UINT8 *SecureBootVar;
//
// Check Secure Boot status and lock Redfish service if Secure Boot is disabled.
//
Status = GetVariable2 (EFI_SECURE_BOOT_MODE_NAME, &gEfiGlobalVariableGuid, (VOID**)&SecureBootVar, NULL);
Status = GetVariable2 (EFI_SECURE_BOOT_MODE_NAME, &gEfiGlobalVariableGuid, (VOID **)&SecureBootVar, NULL);
if (EFI_ERROR (Status) || (*SecureBootVar != SECURE_BOOT_MODE_ENABLE)) {
//
// Secure Boot is disabled