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:
Michael Kubacki
2021-12-05 14:54:09 -08:00
committed by mergify[bot]
parent d1050b9dff
commit ac0a286f4d
445 changed files with 30894 additions and 26369 deletions

View File

@ -36,16 +36,23 @@ SetCaCerts (
VOID
)
{
EFI_STATUS Status;
FIRMWARE_CONFIG_ITEM HttpsCaCertsItem;
UINTN HttpsCaCertsSize;
VOID *HttpsCaCerts;
EFI_STATUS Status;
FIRMWARE_CONFIG_ITEM HttpsCaCertsItem;
UINTN HttpsCaCertsSize;
VOID *HttpsCaCerts;
Status = QemuFwCfgFindFile ("etc/edk2/https/cacerts", &HttpsCaCertsItem,
&HttpsCaCertsSize);
Status = QemuFwCfgFindFile (
"etc/edk2/https/cacerts",
&HttpsCaCertsItem,
&HttpsCaCertsSize
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_VERBOSE, "%a:%a: not touching CA cert list\n",
gEfiCallerBaseName, __FUNCTION__));
DEBUG ((
DEBUG_VERBOSE,
"%a:%a: not touching CA cert list\n",
gEfiCallerBaseName,
__FUNCTION__
));
return;
}
@ -72,23 +79,36 @@ SetCaCerts (
//
// This is fatal.
//
DEBUG ((DEBUG_ERROR, "%a:%a: failed to delete %g:\"%s\"\n",
gEfiCallerBaseName, __FUNCTION__, &gEfiTlsCaCertificateGuid,
EFI_TLS_CA_CERTIFICATE_VARIABLE));
DEBUG ((
DEBUG_ERROR,
"%a:%a: failed to delete %g:\"%s\"\n",
gEfiCallerBaseName,
__FUNCTION__,
&gEfiTlsCaCertificateGuid,
EFI_TLS_CA_CERTIFICATE_VARIABLE
));
ASSERT_EFI_ERROR (Status);
CpuDeadLoop ();
}
if (HttpsCaCertsSize == 0) {
DEBUG ((DEBUG_VERBOSE, "%a:%a: applied empty CA cert list\n",
gEfiCallerBaseName, __FUNCTION__));
DEBUG ((
DEBUG_VERBOSE,
"%a:%a: applied empty CA cert list\n",
gEfiCallerBaseName,
__FUNCTION__
));
return;
}
HttpsCaCerts = AllocatePool (HttpsCaCertsSize);
if (HttpsCaCerts == NULL) {
DEBUG ((DEBUG_ERROR, "%a:%a: failed to allocate HttpsCaCerts\n",
gEfiCallerBaseName, __FUNCTION__));
DEBUG ((
DEBUG_ERROR,
"%a:%a: failed to allocate HttpsCaCerts\n",
gEfiCallerBaseName,
__FUNCTION__
));
return;
}
@ -103,14 +123,25 @@ SetCaCerts (
HttpsCaCerts // Data
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a:%a: failed to set %g:\"%s\": %r\n",
gEfiCallerBaseName, __FUNCTION__, &gEfiTlsCaCertificateGuid,
EFI_TLS_CA_CERTIFICATE_VARIABLE, Status));
DEBUG ((
DEBUG_ERROR,
"%a:%a: failed to set %g:\"%s\": %r\n",
gEfiCallerBaseName,
__FUNCTION__,
&gEfiTlsCaCertificateGuid,
EFI_TLS_CA_CERTIFICATE_VARIABLE,
Status
));
goto FreeHttpsCaCerts;
}
DEBUG ((DEBUG_VERBOSE, "%a:%a: stored CA cert list (%Lu byte(s))\n",
gEfiCallerBaseName, __FUNCTION__, (UINT64)HttpsCaCertsSize));
DEBUG ((
DEBUG_VERBOSE,
"%a:%a: stored CA cert list (%Lu byte(s))\n",
gEfiCallerBaseName,
__FUNCTION__,
(UINT64)HttpsCaCertsSize
));
FreeHttpsCaCerts:
FreePool (HttpsCaCerts);
@ -130,18 +161,26 @@ SetCipherSuites (
VOID
)
{
EFI_STATUS Status;
FIRMWARE_CONFIG_ITEM HttpsCiphersItem;
UINTN HttpsCiphersSize;
VOID *HttpsCiphers;
EFI_STATUS Status;
FIRMWARE_CONFIG_ITEM HttpsCiphersItem;
UINTN HttpsCiphersSize;
VOID *HttpsCiphers;
Status = QemuFwCfgFindFile ("etc/edk2/https/ciphers", &HttpsCiphersItem,
&HttpsCiphersSize);
Status = QemuFwCfgFindFile (
"etc/edk2/https/ciphers",
&HttpsCiphersItem,
&HttpsCiphersSize
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_VERBOSE, "%a:%a: not touching cipher suites\n",
gEfiCallerBaseName, __FUNCTION__));
DEBUG ((
DEBUG_VERBOSE,
"%a:%a: not touching cipher suites\n",
gEfiCallerBaseName,
__FUNCTION__
));
return;
}
//
// From this point on, any failure is fatal. An ordered cipher preference
// list is available from QEMU, thus we cannot let the firmware attempt HTTPS
@ -161,23 +200,36 @@ SetCipherSuites (
NULL // Data
);
if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
DEBUG ((DEBUG_ERROR, "%a:%a: failed to delete %g:\"%s\"\n",
gEfiCallerBaseName, __FUNCTION__, &gEdkiiHttpTlsCipherListGuid,
EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE));
DEBUG ((
DEBUG_ERROR,
"%a:%a: failed to delete %g:\"%s\"\n",
gEfiCallerBaseName,
__FUNCTION__,
&gEdkiiHttpTlsCipherListGuid,
EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE
));
goto Done;
}
if (HttpsCiphersSize == 0) {
DEBUG ((DEBUG_ERROR, "%a:%a: list of cipher suites must not be empty\n",
gEfiCallerBaseName, __FUNCTION__));
DEBUG ((
DEBUG_ERROR,
"%a:%a: list of cipher suites must not be empty\n",
gEfiCallerBaseName,
__FUNCTION__
));
Status = EFI_INVALID_PARAMETER;
goto Done;
}
HttpsCiphers = AllocatePool (HttpsCiphersSize);
if (HttpsCiphers == NULL) {
DEBUG ((DEBUG_ERROR, "%a:%a: failed to allocate HttpsCiphers\n",
gEfiCallerBaseName, __FUNCTION__));
DEBUG ((
DEBUG_ERROR,
"%a:%a: failed to allocate HttpsCiphers\n",
gEfiCallerBaseName,
__FUNCTION__
));
Status = EFI_OUT_OF_RESOURCES;
goto Done;
}
@ -193,14 +245,24 @@ SetCipherSuites (
HttpsCiphers // Data
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a:%a: failed to set %g:\"%s\"\n",
gEfiCallerBaseName, __FUNCTION__, &gEdkiiHttpTlsCipherListGuid,
EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE));
DEBUG ((
DEBUG_ERROR,
"%a:%a: failed to set %g:\"%s\"\n",
gEfiCallerBaseName,
__FUNCTION__,
&gEdkiiHttpTlsCipherListGuid,
EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE
));
goto FreeHttpsCiphers;
}
DEBUG ((DEBUG_VERBOSE, "%a:%a: stored list of cipher suites (%Lu byte(s))\n",
gEfiCallerBaseName, __FUNCTION__, (UINT64)HttpsCiphersSize));
DEBUG ((
DEBUG_VERBOSE,
"%a:%a: stored list of cipher suites (%Lu byte(s))\n",
gEfiCallerBaseName,
__FUNCTION__,
(UINT64)HttpsCiphersSize
));
FreeHttpsCiphers:
FreePool (HttpsCiphers);