RedfishPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the RedfishPkg 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: Abner Chang <abner.chang@hpe.com>
This commit is contained in:
committed by
mergify[bot]
parent
5220bd211d
commit
39de741e2d
@ -9,12 +9,12 @@
|
||||
|
||||
#include "RedfishConfigHandlerCommon.h"
|
||||
|
||||
REDFISH_CONFIG_DRIVER_DATA gRedfishConfigData; // Only one Redfish service supproted
|
||||
REDFISH_CONFIG_DRIVER_DATA gRedfishConfigData; // Only one Redfish service supproted
|
||||
// on platform for the BIOS
|
||||
// Redfish configuration.
|
||||
EFI_EVENT gEndOfDxeEvent = NULL;
|
||||
EFI_EVENT gExitBootServiceEvent = NULL;
|
||||
EDKII_REDFISH_CREDENTIAL_PROTOCOL *gCredential = NULL;
|
||||
EFI_EVENT gEndOfDxeEvent = NULL;
|
||||
EFI_EVENT gExitBootServiceEvent = NULL;
|
||||
EDKII_REDFISH_CREDENTIAL_PROTOCOL *gCredential = NULL;
|
||||
|
||||
/**
|
||||
Callback function executed when the EndOfDxe event group is signaled.
|
||||
@ -30,10 +30,10 @@ RedfishConfigOnEndOfDxe (
|
||||
OUT VOID *Context
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = gCredential->StopService (gCredential, ServiceStopTypeSecureBootDisabled);
|
||||
if (EFI_ERROR(Status) && Status != EFI_UNSUPPORTED) {
|
||||
if (EFI_ERROR (Status) && (Status != EFI_UNSUPPORTED)) {
|
||||
DEBUG ((DEBUG_ERROR, "Redfish credential protocol faied to stop service on EndOfDxe: %r", Status));
|
||||
}
|
||||
|
||||
@ -58,10 +58,10 @@ RedfishConfigOnExitBootService (
|
||||
OUT VOID *Context
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = gCredential->StopService (gCredential, ServiceStopTypeExitBootService);
|
||||
if (EFI_ERROR(Status) && Status != EFI_UNSUPPORTED) {
|
||||
if (EFI_ERROR (Status) && (Status != EFI_UNSUPPORTED)) {
|
||||
DEBUG ((DEBUG_ERROR, "Redfish credential protocol faied to stop service on ExitBootService: %r", Status));
|
||||
}
|
||||
}
|
||||
@ -113,16 +113,18 @@ RedfishConfigCommonInit (
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// Locate Redfish Credential Protocol to get credential for
|
||||
// accessing to Redfish service.
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEdkIIRedfishCredentialProtocolGuid, NULL, (VOID **) &gCredential);
|
||||
Status = gBS->LocateProtocol (&gEdkIIRedfishCredentialProtocolGuid, NULL, (VOID **)&gCredential);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_INFO, "%a: No Redfish Credential Protocol is installed on system.", __FUNCTION__));
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Create EndOfDxe Event.
|
||||
//
|
||||
@ -138,6 +140,7 @@ RedfishConfigCommonInit (
|
||||
DEBUG ((DEBUG_ERROR, "%a: Fail to register End Of DXE event.", __FUNCTION__));
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Create Exit Boot Service event.
|
||||
//
|
||||
@ -155,8 +158,10 @@ RedfishConfigCommonInit (
|
||||
DEBUG ((DEBUG_ERROR, "%a: Fail to register Exit Boot Service event.", __FUNCTION__));
|
||||
return Status;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
This is the common code to stop EDK2 Redfish feature driver.
|
||||
|
||||
@ -167,13 +172,13 @@ RedfishConfigCommonInit (
|
||||
EFI_STATUS
|
||||
RedfishConfigCommonStop (
|
||||
VOID
|
||||
)
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE *HandleBuffer;
|
||||
UINTN NumberOfHandles;
|
||||
UINTN Index;
|
||||
EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL *ConfigHandler;
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE *HandleBuffer;
|
||||
UINTN NumberOfHandles;
|
||||
UINTN Index;
|
||||
EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL *ConfigHandler;
|
||||
|
||||
Status = gBS->LocateHandleBuffer (
|
||||
ByProtocol,
|
||||
@ -182,27 +187,29 @@ RedfishConfigCommonStop (
|
||||
&NumberOfHandles,
|
||||
&HandleBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status) && Status != EFI_NOT_FOUND) {
|
||||
if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
for (Index = 0; Index < NumberOfHandles; Index++) {
|
||||
Status = gBS->HandleProtocol (
|
||||
HandleBuffer[Index],
|
||||
&gEdkIIRedfishConfigHandlerProtocolGuid,
|
||||
(VOID**) &ConfigHandler
|
||||
);
|
||||
HandleBuffer[Index],
|
||||
&gEdkIIRedfishConfigHandlerProtocolGuid,
|
||||
(VOID **)&ConfigHandler
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
Status = ConfigHandler->Stop (ConfigHandler);
|
||||
if (EFI_ERROR (Status) && Status != EFI_UNSUPPORTED) {
|
||||
if (EFI_ERROR (Status) && (Status != EFI_UNSUPPORTED)) {
|
||||
DEBUG ((DEBUG_ERROR, "ERROR: Failed to stop Redfish config handler %p.\n", ConfigHandler));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
/**
|
||||
Callback function executed when a Redfish Config Handler Protocol is installed
|
||||
by EDK2 Redfish Feature Drivers.
|
||||
@ -213,12 +220,12 @@ RedfishConfigHandlerInitialization (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE *HandleBuffer;
|
||||
UINTN NumberOfHandles;
|
||||
EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL *ConfigHandler;
|
||||
UINTN Index;
|
||||
UINT32 Id;
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE *HandleBuffer;
|
||||
UINTN NumberOfHandles;
|
||||
EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL *ConfigHandler;
|
||||
UINTN Index;
|
||||
UINT32 Id;
|
||||
|
||||
Status = gBS->LocateHandleBuffer (
|
||||
ByProtocol,
|
||||
@ -233,33 +240,34 @@ RedfishConfigHandlerInitialization (
|
||||
|
||||
for (Index = 0; Index < NumberOfHandles; Index++) {
|
||||
Status = gBS->HandleProtocol (
|
||||
HandleBuffer [Index],
|
||||
HandleBuffer[Index],
|
||||
&gEfiCallerIdGuid,
|
||||
(VOID **) &Id
|
||||
(VOID **)&Id
|
||||
);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Status = gBS->HandleProtocol (
|
||||
HandleBuffer [Index],
|
||||
&gEdkIIRedfishConfigHandlerProtocolGuid,
|
||||
(VOID**) &ConfigHandler
|
||||
);
|
||||
HandleBuffer[Index],
|
||||
&gEdkIIRedfishConfigHandlerProtocolGuid,
|
||||
(VOID **)&ConfigHandler
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
Status = ConfigHandler->Init (ConfigHandler, &gRedfishConfigData.RedfishServiceInfo);
|
||||
if (EFI_ERROR (Status) && Status != EFI_ALREADY_STARTED) {
|
||||
if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
|
||||
DEBUG ((DEBUG_ERROR, "ERROR: Failed to init Redfish config handler %p.\n", ConfigHandler));
|
||||
}
|
||||
|
||||
//
|
||||
// Install caller ID to indicate Redfish Configure Handler is initialized.
|
||||
//
|
||||
Status = gBS->InstallProtocolInterface (
|
||||
&HandleBuffer [Index],
|
||||
&gEfiCallerIdGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
(VOID *)&gRedfishConfigData.CallerId
|
||||
);
|
||||
&HandleBuffer[Index],
|
||||
&gEfiCallerIdGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
(VOID *)&gRedfishConfigData.CallerId
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user