Skip to content

Commit

Permalink
SignedCapsulePkg: Apply uncrustify changes
Browse files Browse the repository at this point in the history
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the SignedCapsulePkg package

Cc: Andrew Fish <[email protected]>
Cc: Leif Lindholm <[email protected]>
Cc: Michael D Kinney <[email protected]>
Signed-off-by: Michael Kubacki <[email protected]>
Reviewed-by: Jian J Wang <[email protected]>
  • Loading branch information
makubacki authored and mergify[bot] committed Dec 7, 2021
1 parent 47d20b5 commit b878648
Show file tree
Hide file tree
Showing 15 changed files with 1,340 additions and 1,219 deletions.
57 changes: 28 additions & 29 deletions SignedCapsulePkg/Include/Guid/EdkiiSystemFmpCapsule.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
**/


#ifndef __EDKII_SYSTEM_FMP_CAPSULE_GUID_H__
#define __EDKII_SYSTEM_FMP_CAPSULE_GUID_H__

Expand Down Expand Up @@ -90,34 +89,34 @@

#pragma pack(1)
typedef struct {
UINT32 Signature;
UINT32 HeaderLength; // Length of EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR, excluding NameString
UINT32 Length; // Length of the data structure, including NameString
UINT32 Signature;
UINT32 HeaderLength; // Length of EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR, excluding NameString
UINT32 Length; // Length of the data structure, including NameString
// Below structure is similar as UEFI EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetPackageInfo()
UINT32 PackageVersion;
UINT32 PackageVersionNameStringOffset; // Offset from head, CHAR16 string including NULL terminate char
UINT32 PackageVersion;
UINT32 PackageVersionNameStringOffset; // Offset from head, CHAR16 string including NULL terminate char
// Below structure is similar as UEFI EFI_FIRMWARE_IMAGE_DESCRIPTOR
UINT8 ImageIndex;
UINT8 Reserved[3];
EFI_GUID ImageTypeId;
UINT64 ImageId;
UINT32 ImageIdNameStringOffset; // Offset from head, CHAR16 string including NULL terminate char
UINT32 Version;
UINT32 VersionNameStringOffset; // Offset from head, CHAR16 string including NULL terminate char
UINT8 Reserved2[4];
UINT64 Size;
UINT64 AttributesSupported;
UINT64 AttributesSetting;
UINT64 Compatibilities;
UINT32 LowestSupportedImageVersion;
UINT32 LastAttemptVersion;
UINT32 LastAttemptStatus;
UINT8 Reserved3[4];
UINT64 HardwareInstance;
UINT8 ImageIndex;
UINT8 Reserved[3];
EFI_GUID ImageTypeId;
UINT64 ImageId;
UINT32 ImageIdNameStringOffset; // Offset from head, CHAR16 string including NULL terminate char
UINT32 Version;
UINT32 VersionNameStringOffset; // Offset from head, CHAR16 string including NULL terminate char
UINT8 Reserved2[4];
UINT64 Size;
UINT64 AttributesSupported;
UINT64 AttributesSetting;
UINT64 Compatibilities;
UINT32 LowestSupportedImageVersion;
UINT32 LastAttemptVersion;
UINT32 LastAttemptStatus;
UINT8 Reserved3[4];
UINT64 HardwareInstance;
// real string data
//CHAR16 ImageIdNameStr[]; // CHAR16 string including NULL terminate char
//CHAR16 VersionNameStr[]; // CHAR16 string including NULL terminate char
//CHAR16 PackageVersionNameStr[]; // CHAR16 string including NULL terminate char
// CHAR16 ImageIdNameStr[]; // CHAR16 string including NULL terminate char
// CHAR16 VersionNameStr[]; // CHAR16 string including NULL terminate char
// CHAR16 PackageVersionNameStr[]; // CHAR16 string including NULL terminate char
} EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR;
#pragma pack()

Expand All @@ -138,8 +137,8 @@ typedef struct {
+----------------------+
**/

extern EFI_GUID gEdkiiSystemFirmwareImageDescriptorFileGuid;
extern EFI_GUID gEdkiiSystemFmpCapsuleConfigFileGuid;
extern EFI_GUID gEdkiiSystemFmpCapsuleDriverFvFileGuid;
extern EFI_GUID gEdkiiSystemFirmwareImageDescriptorFileGuid;
extern EFI_GUID gEdkiiSystemFmpCapsuleConfigFileGuid;
extern EFI_GUID gEdkiiSystemFmpCapsuleDriverFvFileGuid;

#endif
58 changes: 28 additions & 30 deletions SignedCapsulePkg/Include/Library/EdkiiSystemCapsuleLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/


#ifndef __EDKII_SYSTEM_CAPSULE_LIB_H__
#define __EDKII_SYSTEM_CAPSULE_LIB_H__

Expand All @@ -26,10 +25,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
BOOLEAN
EFIAPI
ExtractSystemFirmwareImageFmpInfo (
IN VOID *SystemFirmwareImage,
IN UINTN SystemFirmwareImageSize,
OUT EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR **ImageFmpInfo,
OUT UINTN *ImageFmpInfoSize
IN VOID *SystemFirmwareImage,
IN UINTN SystemFirmwareImageSize,
OUT EDKII_SYSTEM_FIRMWARE_IMAGE_DESCRIPTOR **ImageFmpInfo,
OUT UINTN *ImageFmpInfoSize
);

/**
Expand All @@ -46,10 +45,10 @@ ExtractSystemFirmwareImageFmpInfo (
BOOLEAN
EFIAPI
ExtractDriverFvImage (
IN VOID *AuthenticatedImage,
IN UINTN AuthenticatedImageSize,
OUT VOID **DriverFvImage,
OUT UINTN *DriverFvImageSize
IN VOID *AuthenticatedImage,
IN UINTN AuthenticatedImageSize,
OUT VOID **DriverFvImage,
OUT UINTN *DriverFvImageSize
);

/**
Expand All @@ -66,10 +65,10 @@ ExtractDriverFvImage (
BOOLEAN
EFIAPI
ExtractConfigImage (
IN VOID *AuthenticatedImage,
IN UINTN AuthenticatedImageSize,
OUT VOID **ConfigImage,
OUT UINTN *ConfigImageSize
IN VOID *AuthenticatedImage,
IN UINTN AuthenticatedImageSize,
OUT VOID **ConfigImage,
OUT UINTN *ConfigImageSize
);

/**
Expand All @@ -86,10 +85,10 @@ ExtractConfigImage (
BOOLEAN
EFIAPI
ExtractSystemFirmwareImage (
IN VOID *AuthenticatedImage,
IN UINTN AuthenticatedImageSize,
OUT VOID **SystemFirmwareImage,
OUT UINTN *SystemFirmwareImageSize
IN VOID *AuthenticatedImage,
IN UINTN AuthenticatedImageSize,
OUT VOID **SystemFirmwareImage,
OUT UINTN *SystemFirmwareImageSize
);

/**
Expand All @@ -107,11 +106,11 @@ ExtractSystemFirmwareImage (
BOOLEAN
EFIAPI
ExtractAuthenticatedImage (
IN VOID *Image,
IN UINTN ImageSize,
OUT UINT32 *LastAttemptStatus,
OUT VOID **AuthenticatedImage,
OUT UINTN *AuthenticatedImageSize
IN VOID *Image,
IN UINTN ImageSize,
OUT UINT32 *LastAttemptStatus,
OUT VOID **AuthenticatedImage,
OUT UINTN *AuthenticatedImageSize
);

/**
Expand All @@ -135,14 +134,13 @@ ExtractAuthenticatedImage (
EFI_STATUS
EFIAPI
CapsuleAuthenticateSystemFirmware (
IN VOID *Image,
IN UINTN ImageSize,
IN BOOLEAN ForceVersionMatch,
OUT UINT32 *LastAttemptVersion,
OUT UINT32 *LastAttemptStatus,
OUT VOID **AuthenticatedImage,
OUT UINTN *AuthenticatedImageSize
IN VOID *Image,
IN UINTN ImageSize,
IN BOOLEAN ForceVersionMatch,
OUT UINT32 *LastAttemptVersion,
OUT UINT32 *LastAttemptStatus,
OUT VOID **AuthenticatedImage,
OUT UINTN *AuthenticatedImageSize
);

#endif

48 changes: 23 additions & 25 deletions SignedCapsulePkg/Include/Library/IniParsingLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/


#ifndef __INI_PARSING_LIB_H__
#define __INI_PARSING_LIB_H__

Expand All @@ -41,8 +40,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
VOID *
EFIAPI
OpenIniFile (
IN UINT8 *DataBuffer,
IN UINTN BufferSize
IN UINT8 *DataBuffer,
IN UINTN BufferSize
);

/**
Expand All @@ -59,10 +58,10 @@ OpenIniFile (
EFI_STATUS
EFIAPI
GetStringFromDataFile (
IN VOID *Context,
IN CHAR8 *SectionName,
IN CHAR8 *EntryName,
OUT CHAR8 **EntryValue
IN VOID *Context,
IN CHAR8 *SectionName,
IN CHAR8 *EntryName,
OUT CHAR8 **EntryValue
);

/**
Expand All @@ -79,10 +78,10 @@ GetStringFromDataFile (
EFI_STATUS
EFIAPI
GetGuidFromDataFile (
IN VOID *Context,
IN CHAR8 *SectionName,
IN CHAR8 *EntryName,
OUT EFI_GUID *Guid
IN VOID *Context,
IN CHAR8 *SectionName,
IN CHAR8 *EntryName,
OUT EFI_GUID *Guid
);

/**
Expand All @@ -99,10 +98,10 @@ GetGuidFromDataFile (
EFI_STATUS
EFIAPI
GetDecimalUintnFromDataFile (
IN VOID *Context,
IN CHAR8 *SectionName,
IN CHAR8 *EntryName,
OUT UINTN *Data
IN VOID *Context,
IN CHAR8 *SectionName,
IN CHAR8 *EntryName,
OUT UINTN *Data
);

/**
Expand All @@ -119,10 +118,10 @@ GetDecimalUintnFromDataFile (
EFI_STATUS
EFIAPI
GetHexUintnFromDataFile (
IN VOID *Context,
IN CHAR8 *SectionName,
IN CHAR8 *EntryName,
OUT UINTN *Data
IN VOID *Context,
IN CHAR8 *SectionName,
IN CHAR8 *EntryName,
OUT UINTN *Data
);

/**
Expand All @@ -139,10 +138,10 @@ GetHexUintnFromDataFile (
EFI_STATUS
EFIAPI
GetHexUint64FromDataFile (
IN VOID *Context,
IN CHAR8 *SectionName,
IN CHAR8 *EntryName,
OUT UINT64 *Data
IN VOID *Context,
IN CHAR8 *SectionName,
IN CHAR8 *EntryName,
OUT UINT64 *Data
);

/**
Expand All @@ -153,8 +152,7 @@ GetHexUint64FromDataFile (
VOID
EFIAPI
CloseIniFile (
IN VOID *Context
IN VOID *Context
);

#endif

11 changes: 5 additions & 6 deletions SignedCapsulePkg/Include/Library/PlatformFlashAccessLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
**/


#ifndef __PLATFORM_FLASH_ACCESS_LIB_H__
#define __PLATFORM_FLASH_ACCESS_LIB_H__

Expand Down Expand Up @@ -43,11 +42,11 @@ typedef enum {
EFI_STATUS
EFIAPI
PerformFlashWrite (
IN PLATFORM_FIRMWARE_TYPE FirmwareType,
IN EFI_PHYSICAL_ADDRESS FlashAddress,
IN FLASH_ADDRESS_TYPE FlashAddressType,
IN VOID *Buffer,
IN UINTN Length
IN PLATFORM_FIRMWARE_TYPE FirmwareType,
IN EFI_PHYSICAL_ADDRESS FlashAddress,
IN FLASH_ADDRESS_TYPE FlashAddressType,
IN VOID *Buffer,
IN UINTN Length
);

/**
Expand Down
Loading

0 comments on commit b878648

Please sign in to comment.