OvmfPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the OvmfPkg 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: Andrew Fish <afish@apple.com>
This commit is contained in:
committed by
mergify[bot]
parent
d1050b9dff
commit
ac0a286f4d
@@ -21,8 +21,7 @@
|
||||
//
|
||||
// Name of the UEFI variable that we use for persistent storage.
|
||||
//
|
||||
STATIC CHAR16 mVariableName[] = L"PlatformConfig";
|
||||
|
||||
STATIC CHAR16 mVariableName[] = L"PlatformConfig";
|
||||
|
||||
/**
|
||||
Serialize and persistently save platform configuration.
|
||||
@@ -34,10 +33,10 @@ STATIC CHAR16 mVariableName[] = L"PlatformConfig";
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PlatformConfigSave (
|
||||
IN PLATFORM_CONFIG *PlatformConfig
|
||||
IN PLATFORM_CONFIG *PlatformConfig
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// We could implement any kind of translation here, as part of serialization.
|
||||
@@ -45,14 +44,17 @@ PlatformConfigSave (
|
||||
// variables with human-readable contents, allowing other tools to access
|
||||
// them more easily. For now, just save a binary dump.
|
||||
//
|
||||
Status = gRT->SetVariable (mVariableName, &gOvmfPlatformConfigGuid,
|
||||
Status = gRT->SetVariable (
|
||||
mVariableName,
|
||||
&gOvmfPlatformConfigGuid,
|
||||
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS |
|
||||
EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
sizeof *PlatformConfig, PlatformConfig);
|
||||
EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
sizeof *PlatformConfig,
|
||||
PlatformConfig
|
||||
);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Load and deserialize platform configuration.
|
||||
|
||||
@@ -73,13 +75,13 @@ PlatformConfigSave (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PlatformConfigLoad (
|
||||
OUT PLATFORM_CONFIG *PlatformConfig,
|
||||
OUT UINT64 *OptionalElements
|
||||
OUT PLATFORM_CONFIG *PlatformConfig,
|
||||
OUT UINT64 *OptionalElements
|
||||
)
|
||||
{
|
||||
VOID *Data;
|
||||
UINTN DataSize;
|
||||
EFI_STATUS Status;
|
||||
VOID *Data;
|
||||
UINTN DataSize;
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// Any translation done in PlatformConfigSave() would have to be mirrored
|
||||
@@ -89,8 +91,12 @@ PlatformConfigLoad (
|
||||
// (only incremental changes, ie. new fields), and on GUID.
|
||||
// (Incompatible changes require a GUID change.)
|
||||
//
|
||||
Status = GetVariable2 (mVariableName, &gOvmfPlatformConfigGuid, &Data,
|
||||
&DataSize);
|
||||
Status = GetVariable2 (
|
||||
mVariableName,
|
||||
&gOvmfPlatformConfigGuid,
|
||||
&Data,
|
||||
&DataSize
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
@@ -108,15 +114,18 @@ PlatformConfigLoad (
|
||||
//
|
||||
// Handle firmware upgrade -- zero out missing fields.
|
||||
//
|
||||
ZeroMem ((UINT8 *)PlatformConfig + DataSize,
|
||||
sizeof *PlatformConfig - DataSize);
|
||||
ZeroMem (
|
||||
(UINT8 *)PlatformConfig + DataSize,
|
||||
sizeof *PlatformConfig - DataSize
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Based on DataSize, report the optional features that we recognize.
|
||||
//
|
||||
if (DataSize >= (OFFSET_OF (PLATFORM_CONFIG, VerticalResolution) +
|
||||
sizeof PlatformConfig->VerticalResolution)) {
|
||||
sizeof PlatformConfig->VerticalResolution))
|
||||
{
|
||||
*OptionalElements |= PLATFORM_CONFIG_F_GRAPHICS_RESOLUTION;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user