summaryrefslogtreecommitdiffstats
path: root/RedfishPkg/Include
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:54:11 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commit39de741e2dcb8f11e9b4438e37224797643d8451 (patch)
treeddf957e0b215e0918dc53ad756c6bd047c9b7b16 /RedfishPkg/Include
parent5220bd211df890f2672c23c050082862cd1e82d6 (diff)
downloadedk2-39de741e2dcb8f11e9b4438e37224797643d8451.tar.gz
edk2-39de741e2dcb8f11e9b4438e37224797643d8451.tar.bz2
edk2-39de741e2dcb8f11e9b4438e37224797643d8451.zip
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>
Diffstat (limited to 'RedfishPkg/Include')
-rw-r--r--RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h93
-rw-r--r--RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h16
-rw-r--r--RedfishPkg/Include/Library/JsonLib.h189
-rw-r--r--RedfishPkg/Include/Library/RedfishContentCodingLib.h22
-rw-r--r--RedfishPkg/Include/Library/RedfishCredentialLib.h14
-rw-r--r--RedfishPkg/Include/Library/RedfishCrtLib.h528
-rw-r--r--RedfishPkg/Include/Library/RedfishHostInterfaceLib.h13
-rw-r--r--RedfishPkg/Include/Library/RestExLib.h10
-rw-r--r--RedfishPkg/Include/Pcd/RestExServiceDevicePath.h6
-rw-r--r--RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h29
-rw-r--r--RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h11
11 files changed, 618 insertions, 313 deletions
diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
index 3eec7a0b0e..49b3ceee39 100644
--- a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
+++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h
@@ -12,72 +12,72 @@
#include <IndustryStandard/SmBios.h>
-#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB 0x02 // We don't support this type of interface.
+#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB 0x02 // We don't support this type of interface.
// Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 instead.
-#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE 0x03 // We don't support this type of interface.
+#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE 0x03 // We don't support this type of interface.
// Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 instead.
-#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 0x04
-#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 0x05
+#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 0x04
+#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 0x05
-#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_UNKNOWN 0x00
-#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_STATIC 0x01
-#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_DHCP 0x02
-#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_AUTO_CONFIGURE 0x03
-#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_HOST_SELECTED 0x04
+#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_UNKNOWN 0x00
+#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_STATIC 0x01
+#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_DHCP 0x02
+#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_AUTO_CONFIGURE 0x03
+#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_HOST_SELECTED 0x04
-#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_UNKNOWN 0x00
-#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4 0x01
-#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6 0x02
+#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_UNKNOWN 0x00
+#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4 0x01
+#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6 0x02
#pragma pack(1)
///
/// Structure definitions of Host Interface device type 04h (USB Network Interface V2)
///
typedef struct {
- UINT8 Length; ///< Length of the structure, including Device Type
+ UINT8 Length; ///< Length of the structure, including Device Type
///< and Length fields.
- UINT16 IdVendor; ///< The Vendor ID of the device, as read from the
+ UINT16 IdVendor; ///< The Vendor ID of the device, as read from the
///< idVendor field of the USB descriptor.
- UINT16 IdProduct; ///< The Product ID of the device, as read from the
+ UINT16 IdProduct; ///< The Product ID of the device, as read from the
///< idProduct field of the USB descriptor.
- UINT8 SecialNumberStr; ///< The string number for the Serial Number of the
+ UINT8 SecialNumberStr; ///< The string number for the Serial Number of the
///< device. The string data is read from the
///< iSerialNumber.bDescriptorType field of the USB
///< descriptor, and is converted from Unicode to ASCII
///< and is NULL terminated.
- UINT8 MacAddress [6]; ///< The MAC address of the PCI/PCIe network device.
+ UINT8 MacAddress[6]; ///< The MAC address of the PCI/PCIe network device.
} USB_INTERFACE_DEVICE_DESCRIPTOR_V2;
//
// Structure definitions of Host Interface device type 05h (PCI/PCIE V2)
//
typedef struct {
- UINT8 Length; ///< Length of the structure, including Device Type and Length fields.
- UINT16 VendorId; ///< The Vendor ID of the PCI/PCIe device.
- UINT16 DeviceId; ///< The Device ID of the PCI/PCIe device.
- UINT16 SubsystemVendorId; ///< The Subsystem Vendor ID of the PCI/PCIe device.
- UINT16 SubsystemId; ///< The Subsystem ID of the PCI/PCIe device.
- UINT8 MacAddress [6]; ///< The MAC address of the PCI/PCIe network device.
- UINT16 SegmemtGroupNumber; ///< The Segment Group Number of the PCI/PCIe.
- UINT8 BusNumber; ///< The Bus Number of the PCI/PCIe device.
- UINT8 DeviceFunctionNumber; ///< The Device/Function Number of the PCI/PCIe.
+ UINT8 Length; ///< Length of the structure, including Device Type and Length fields.
+ UINT16 VendorId; ///< The Vendor ID of the PCI/PCIe device.
+ UINT16 DeviceId; ///< The Device ID of the PCI/PCIe device.
+ UINT16 SubsystemVendorId; ///< The Subsystem Vendor ID of the PCI/PCIe device.
+ UINT16 SubsystemId; ///< The Subsystem ID of the PCI/PCIe device.
+ UINT8 MacAddress[6]; ///< The MAC address of the PCI/PCIe network device.
+ UINT16 SegmemtGroupNumber; ///< The Segment Group Number of the PCI/PCIe.
+ UINT8 BusNumber; ///< The Bus Number of the PCI/PCIe device.
+ UINT8 DeviceFunctionNumber; ///< The Device/Function Number of the PCI/PCIe.
} PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2;
///
/// Structure definitions of Host Interface device type 80-FFh (OEM)
///
typedef struct {
- UINT32 VendorIana; ///< The IANA code for the vendor (MSB first).
- UINT8 OemDefinedData[1]; ///< OEM defined data.
+ UINT32 VendorIana; ///< The IANA code for the vendor (MSB first).
+ UINT8 OemDefinedData[1]; ///< OEM defined data.
} OEM_DEVICE_DESCRIPTOR;
///
/// Define union for the Host Interface Device Descriptor
///
typedef union {
- USB_INTERFACE_DEVICE_DESCRIPTOR_V2 UsbDeviceV2; ///< Device type USB V2 device discriptor.
- PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2 PciPcieDeviceV2; ///< Device type PCI/PCIe V2 device discriptor.
- OEM_DEVICE_DESCRIPTOR OemDevice; ///< OEM type device discriptor.
+ USB_INTERFACE_DEVICE_DESCRIPTOR_V2 UsbDeviceV2; ///< Device type USB V2 device discriptor.
+ PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2 PciPcieDeviceV2; ///< Device type PCI/PCIe V2 device discriptor.
+ OEM_DEVICE_DESCRIPTOR OemDevice; ///< OEM type device discriptor.
} DEVICE_DESCRITOR; /// Device descriptor data formated based on Device Type.
///
@@ -87,15 +87,15 @@ typedef union {
/// specific Tape 42 table.
///
typedef struct {
- UINT8 DeviceType; ///< The Device Type of the interface.
- DEVICE_DESCRITOR DeviceDescriptor; ///< The Device descriptor.
+ UINT8 DeviceType; ///< The Device Type of the interface.
+ DEVICE_DESCRITOR DeviceDescriptor; ///< The Device descriptor.
} REDFISH_INTERFACE_DATA;
//
// the protocol-specific data for the "Redfish Over IP" protocol
//
typedef struct {
- EFI_GUID ServiceUuid; //same as Redfish Service UUID in Redfish Service Root resource
+ EFI_GUID ServiceUuid; // same as Redfish Service UUID in Redfish Service Root resource
//
// Unknown=00h,
@@ -105,7 +105,7 @@ typedef struct {
// HostSelected=04h,
// other values reserved
//
- UINT8 HostIpAssignmentType;
+ UINT8 HostIpAssignmentType;
//
// Unknown=00h,
@@ -113,19 +113,19 @@ typedef struct {
// Ipv6=02h,
// other values reserved
//
- UINT8 HostIpAddressFormat;
+ UINT8 HostIpAddressFormat;
//
// Used for Static and AutoConfigure.
// For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
//
- UINT8 HostIpAddress[16];
+ UINT8 HostIpAddress[16];
//
// Used for Static and AutoConfigure.
// For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
//
- UINT8 HostIpMask[16];
+ UINT8 HostIpMask[16];
//
// Unknown=00h,
@@ -135,7 +135,7 @@ typedef struct {
// HostSelected=04h,
// other values reserved
//
- UINT8 RedfishServiceIpDiscoveryType;
+ UINT8 RedfishServiceIpDiscoveryType;
//
// Unknown=00h,
@@ -143,27 +143,26 @@ typedef struct {
// Ipv6=02h,
// other values reserved
//
- UINT8 RedfishServiceIpAddressFormat;
+ UINT8 RedfishServiceIpAddressFormat;
//
// Used for Static and AutoConfigure.
// For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
//
- UINT8 RedfishServiceIpAddress[16];
+ UINT8 RedfishServiceIpAddress[16];
//
// Used for Static and AutoConfigure.
// For IPV4, use the first 4 Bytes and zero fill the remaining bytes.
//
- UINT8 RedfishServiceIpMask[16];
+ UINT8 RedfishServiceIpMask[16];
- UINT16 RedfishServiceIpPort; // Used for Static and AutoConfigure.
- UINT32 RedfishServiceVlanId; // Used for Static and AutoConfigure.
- UINT8 RedfishServiceHostnameLength; // length of the following hostname string
- UINT8 RedfishServiceHostname[1]; // hostname of Redfish Service
+ UINT16 RedfishServiceIpPort; // Used for Static and AutoConfigure.
+ UINT32 RedfishServiceVlanId; // Used for Static and AutoConfigure.
+ UINT8 RedfishServiceHostnameLength; // length of the following hostname string
+ UINT8 RedfishServiceHostname[1]; // hostname of Redfish Service
} REDFISH_OVER_IP_PROTOCOL_DATA;
#pragma pack()
#endif
-
diff --git a/RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h b/RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h
index c6989617df..5017043827 100644
--- a/RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h
+++ b/RedfishPkg/Include/Library/BaseUcs2Utf8Lib.h
@@ -14,11 +14,11 @@
///
/// L"\u0000"
///
-#define UNICODE_FORMAT_LEN 6
-#define UNICODE_FORMAT_CHAR_LEN 2
-#define UNICODE_FORMAT_CHAR_SIZE 3
+#define UNICODE_FORMAT_LEN 6
+#define UNICODE_FORMAT_CHAR_LEN 2
+#define UNICODE_FORMAT_CHAR_SIZE 3
-#define UTF8_BUFFER_FOR_UCS2_MAX_SIZE 3
+#define UTF8_BUFFER_FOR_UCS2_MAX_SIZE 3
/**
Convert a UCS2 string to a UTF8 encoded string.
@@ -34,8 +34,8 @@
**/
EFI_STATUS
UCS2StrToUTF8 (
- IN CHAR16 *Ucs2Str,
- OUT CHAR8 **Utf8StrAddr
+ IN CHAR16 *Ucs2Str,
+ OUT CHAR8 **Utf8StrAddr
);
/**
@@ -54,8 +54,8 @@ UCS2StrToUTF8 (
**/
EFI_STATUS
UTF8StrToUCS2 (
- IN CHAR8 *Utf8Str,
- OUT CHAR16 **Ucs2StrAddr
+ IN CHAR8 *Utf8Str,
+ OUT CHAR16 **Ucs2StrAddr
);
#endif
diff --git a/RedfishPkg/Include/Library/JsonLib.h b/RedfishPkg/Include/Library/JsonLib.h
index 83959dd52a..f98f4e779e 100644
--- a/RedfishPkg/Include/Library/JsonLib.h
+++ b/RedfishPkg/Include/Library/JsonLib.h
@@ -7,17 +7,18 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
+
#ifndef JSON_LIB_H_
#define JSON_LIB_H_
-typedef VOID* EDKII_JSON_VALUE;
-typedef VOID* EDKII_JSON_ARRAY;
-typedef VOID* EDKII_JSON_OBJECT;
+typedef VOID *EDKII_JSON_VALUE;
+typedef VOID *EDKII_JSON_ARRAY;
+typedef VOID *EDKII_JSON_OBJECT;
///
/// Map to json_int_t in jansson.h
///
-typedef INT64 EDKII_JSON_INT_T; // #JSON_INTEGER_IS_LONG_LONG is set to 1
+typedef INT64 EDKII_JSON_INT_T; // #JSON_INTEGER_IS_LONG_LONG is set to 1
// in jansson_Config.h
///
@@ -25,28 +26,28 @@ typedef INT64 EDKII_JSON_INT_T; // #JSON_INTEGER_IS_LONG_LONG is set to 1
/// See below URI for the JSON encoding flags reference.
/// https://jansson.readthedocs.io/en/2.13/apiref.html#encoding
///
-#define EDKII_JSON_MAX_INDENT 0x1F
-#define EDKII_JSON_INDENT(n) ((n) & EDKII_JSON_MAX_INDENT)
-
-#define EDKII_JSON_COMPACT 0x20
-#define EDKII_JSON_ENSURE_ASCII 0x40
-#define EDKII_JSON_SORT_KEYS 0x80
-#define EDKII_JSON_PRESERVE_ORDER 0x100
-#define EDKII_JSON_ENCODE_ANY 0x200
-#define EDKII_JSON_ESCAPE_SLASH 0x400
-#define EDKII_JSON_REAL_PRECISION(n) (((n) & 0x1F) << 11)
-#define EDKII_JSON_EMBED 0x10000
+#define EDKII_JSON_MAX_INDENT 0x1F
+#define EDKII_JSON_INDENT(n) ((n) & EDKII_JSON_MAX_INDENT)
+
+#define EDKII_JSON_COMPACT 0x20
+#define EDKII_JSON_ENSURE_ASCII 0x40
+#define EDKII_JSON_SORT_KEYS 0x80
+#define EDKII_JSON_PRESERVE_ORDER 0x100
+#define EDKII_JSON_ENCODE_ANY 0x200
+#define EDKII_JSON_ESCAPE_SLASH 0x400
+#define EDKII_JSON_REAL_PRECISION(n) (((n) & 0x1F) << 11)
+#define EDKII_JSON_EMBED 0x10000
///
/// Map to the definitions in jansson.h
/// See below URI for the JSON decoding flags reference.
/// https://jansson.readthedocs.io/en/2.13/apiref.html?highlight=json_loadb#decoding
///
-#define EDKII_JSON_REJECT_DUPLICATES 0x1
-#define EDKII_JSON_DISABLE_EOF_CHECK 0x2
-#define EDKII_JSON_DECODE_ANY 0x4
-#define EDKII_JSON_DECODE_INT_AS_REAL 0x8
-#define EDKII_JSON_ALLOW_NUL 0x10
+#define EDKII_JSON_REJECT_DUPLICATES 0x1
+#define EDKII_JSON_DISABLE_EOF_CHECK 0x2
+#define EDKII_JSON_DECODE_ANY 0x4
+#define EDKII_JSON_DECODE_INT_AS_REAL 0x8
+#define EDKII_JSON_ALLOW_NUL 0x10
#define EDKII_JSON_ARRAY_FOREACH(Array, Index, Value) \
for(Index = 0; \
@@ -63,28 +64,28 @@ typedef INT64 EDKII_JSON_INT_T; // #JSON_INTEGER_IS_LONG_LONG is set to 1
///
/// Map to the json_error_t in jansson.h
///
-#define EDKII_JSON_ERROR_TEXT_LENGTH 160
-#define EDKII_JSON_ERROR_SOURCE_LENGTH 80
+#define EDKII_JSON_ERROR_TEXT_LENGTH 160
+#define EDKII_JSON_ERROR_SOURCE_LENGTH 80
typedef struct {
- INTN Line;
- INTN Column;
- INTN Position;
- CHAR8 Source [EDKII_JSON_ERROR_SOURCE_LENGTH];
- CHAR8 Text [EDKII_JSON_ERROR_TEXT_LENGTH];
+ INTN Line;
+ INTN Column;
+ INTN Position;
+ CHAR8 Source[EDKII_JSON_ERROR_SOURCE_LENGTH];
+ CHAR8 Text[EDKII_JSON_ERROR_TEXT_LENGTH];
} EDKII_JSON_ERROR;
///
/// Map to the json_type in jansson.h
///
typedef enum {
- EdkiiJsonTypeObject,
- EdkiiJsonTypeArray,
- EdkiiJsonTypeString,
- EdkiiJsonTypeInteger,
- EdkiiJsonTypeReal,
- EdkiiJsonTypeTrue,
- EdkiiJsonTypeFalse,
- EdkiiJsonTypeNull
+ EdkiiJsonTypeObject,
+ EdkiiJsonTypeArray,
+ EdkiiJsonTypeString,
+ EdkiiJsonTypeInteger,
+ EdkiiJsonTypeReal,
+ EdkiiJsonTypeTrue,
+ EdkiiJsonTypeFalse,
+ EdkiiJsonTypeNull
} EDKII_JSON_TYPE;
/**
@@ -147,7 +148,7 @@ JsonValueInitObject (
EDKII_JSON_VALUE
EFIAPI
JsonValueInitAsciiString (
- IN CONST CHAR8 *String
+ IN CONST CHAR8 *String
);
/**
@@ -170,7 +171,7 @@ JsonValueInitAsciiString (
EDKII_JSON_VALUE
EFIAPI
JsonValueInitUnicodeString (
- IN CHAR16 *String
+ IN CHAR16 *String
);
/**
@@ -190,7 +191,7 @@ JsonValueInitUnicodeString (
EDKII_JSON_VALUE
EFIAPI
JsonValueInitInteger (
- IN INT64 Value
+ IN INT64 Value
);
/**
@@ -207,7 +208,7 @@ JsonValueInitInteger (
EDKII_JSON_VALUE
EFIAPI
JsonValueInitBoolean (
- IN BOOLEAN Value
+ IN BOOLEAN Value
);
/**
@@ -278,7 +279,7 @@ JsonValueInitFalse (
VOID
EFIAPI
JsonValueFree (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -301,7 +302,7 @@ JsonValueFree (
EDKII_JSON_VALUE
EFIAPI
JsonValueClone (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -316,7 +317,7 @@ JsonValueClone (
BOOLEAN
EFIAPI
JsonValueIsArray (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -331,7 +332,7 @@ JsonValueIsArray (
BOOLEAN
EFIAPI
JsonValueIsObject (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -347,7 +348,7 @@ JsonValueIsObject (
BOOLEAN
EFIAPI
JsonValueIsString (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -362,7 +363,7 @@ JsonValueIsString (
BOOLEAN
EFIAPI
JsonValueIsInteger (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -377,7 +378,7 @@ JsonValueIsInteger (
BOOLEAN
EFIAPI
JsonValueIsNumber (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -392,7 +393,7 @@ JsonValueIsNumber (
BOOLEAN
EFIAPI
JsonValueIsBoolean (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -407,7 +408,7 @@ JsonValueIsBoolean (
BOOLEAN
EFIAPI
JsonValueIsTrue (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -422,7 +423,7 @@ JsonValueIsTrue (
BOOLEAN
EFIAPI
JsonValueIsFalse (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -437,7 +438,7 @@ JsonValueIsFalse (
BOOLEAN
EFIAPI
JsonValueIsNull (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -453,7 +454,7 @@ JsonValueIsNull (
EDKII_JSON_ARRAY
EFIAPI
JsonValueGetArray (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -469,7 +470,7 @@ JsonValueGetArray (
EDKII_JSON_OBJECT
EFIAPI
JsonValueGetObject (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -485,7 +486,7 @@ JsonValueGetObject (
CONST CHAR8 *
EFIAPI
JsonValueGetAsciiString (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -499,10 +500,10 @@ JsonValueGetAsciiString (
@retval Return the associated Unicode string in JSON value or NULL.
**/
-CHAR16*
+CHAR16 *
EFIAPI
JsonValueGetUnicodeString (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -519,7 +520,7 @@ JsonValueGetUnicodeString (
INT64
EFIAPI
JsonValueGetInteger (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -536,7 +537,7 @@ JsonValueGetInteger (
BOOLEAN
EFIAPI
JsonValueGetBoolean (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -549,10 +550,10 @@ JsonValueGetBoolean (
@retval Return the associated Ascii string in JSON value or NULL on errors.
**/
-CONST CHAR8*
+CONST CHAR8 *
EFIAPI
JsonValueGetString (
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -567,7 +568,7 @@ JsonValueGetString (
UINTN
EFIAPI
JsonObjectSize (
- IN EDKII_JSON_OBJECT JsonObject
+ IN EDKII_JSON_OBJECT JsonObject
);
/**
@@ -583,10 +584,10 @@ JsonObjectSize (
JsonObj is not an JSON object, key count is zero or on other errors.
**/
-CHAR8**
+CHAR8 **
JsonObjectGetKeys (
- IN EDKII_JSON_OBJECT JsonObj,
- OUT UINTN *KeyCount
+ IN EDKII_JSON_OBJECT JsonObj,
+ OUT UINTN *KeyCount
);
/**
@@ -608,8 +609,8 @@ JsonObjectGetKeys (
EDKII_JSON_VALUE
EFIAPI
JsonObjectGetValue (
- IN CONST EDKII_JSON_OBJECT JsonObj,
- IN CONST CHAR8 *Key
+ IN CONST EDKII_JSON_OBJECT JsonObj,
+ IN CONST CHAR8 *Key
);
/**
@@ -633,9 +634,9 @@ JsonObjectGetValue (
EFI_STATUS
EFIAPI
JsonObjectSetValue (
- IN EDKII_JSON_OBJECT JsonObj,
- IN CONST CHAR8 *Key,
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_OBJECT JsonObj,
+ IN CONST CHAR8 *Key,
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -650,7 +651,7 @@ JsonObjectSetValue (
UINTN
EFIAPI
JsonArrayCount (
- IN EDKII_JSON_ARRAY JsonArray
+ IN EDKII_JSON_ARRAY JsonArray
);
/**
@@ -672,8 +673,8 @@ JsonArrayCount (
EDKII_JSON_VALUE
EFIAPI
JsonArrayGetValue (
- IN EDKII_JSON_ARRAY JsonArray,
- IN UINTN Index
+ IN EDKII_JSON_ARRAY JsonArray,
+ IN UINTN Index
);
/**
@@ -692,8 +693,8 @@ JsonArrayGetValue (
EFI_STATUS
EFIAPI
JsonArrayAppendValue (
- IN EDKII_JSON_ARRAY JsonArray,
- IN EDKII_JSON_VALUE Json
+ IN EDKII_JSON_ARRAY JsonArray,
+ IN EDKII_JSON_VALUE Json
);
/**
@@ -713,8 +714,8 @@ JsonArrayAppendValue (
EFI_STATUS
EFIAPI
JsonArrayRemoveValue (
- IN EDKII_JSON_ARRAY JsonArray,
- IN UINTN Index
+ IN EDKII_JSON_ARRAY JsonArray,
+ IN UINTN Index
);
/**
@@ -742,8 +743,8 @@ JsonArrayRemoveValue (
CHAR8 *
EFIAPI
JsonDumpString (
- IN EDKII_JSON_VALUE JsonValue,
- IN UINTN Flags
+ IN EDKII_JSON_VALUE JsonValue,
+ IN UINTN Flags
);
/**
@@ -766,9 +767,9 @@ JsonDumpString (
EDKII_JSON_VALUE
EFIAPI
JsonLoadString (
- IN CONST CHAR8* String,
- IN UINT64 Flags,
- IN EDKII_JSON_ERROR *Error
+ IN CONST CHAR8 *String,
+ IN UINT64 Flags,
+ IN EDKII_JSON_ERROR *Error
);
/**
@@ -793,7 +794,7 @@ JsonLoadString (
EDKII_JSON_VALUE
EFIAPI
JsonLoadBuffer (
- IN CONST CHAR8 *Buffer,
+ IN CONST CHAR8 *Buffer,
IN UINTN BufferLen,
IN UINTN Flags,
IN OUT EDKII_JSON_ERROR *Error
@@ -815,7 +816,7 @@ JsonLoadBuffer (
VOID
EFIAPI
JsonDecreaseReference (
- IN EDKII_JSON_VALUE JsonValue
+ IN EDKII_JSON_VALUE JsonValue
);
/**
@@ -833,8 +834,9 @@ JsonDecreaseReference (
EDKII_JSON_VALUE
EFIAPI
JsonIncreaseReference (
- IN EDKII_JSON_VALUE JsonValue
+ IN EDKII_JSON_VALUE JsonValue
);
+
/**
Returns an opaque iterator which can be used to iterate over all key-value pairs
in object, or NULL if object is empty
@@ -844,7 +846,7 @@ JsonIncreaseReference (
VOID *
EFIAPI
JsonObjectIterator (
- IN EDKII_JSON_VALUE JsonValue
+ IN EDKII_JSON_VALUE JsonValue
);
/**
@@ -855,7 +857,7 @@ JsonObjectIterator (
EDKII_JSON_VALUE
EFIAPI
JsonObjectIteratorValue (
- IN VOID *Iterator
+ IN VOID *Iterator
);
/**
@@ -869,8 +871,8 @@ JsonObjectIteratorValue (
VOID *
EFIAPI
JsonObjectIteratorNext (
- IN EDKII_JSON_VALUE JsonValue,
- IN VOID *Iterator
+ IN EDKII_JSON_VALUE JsonValue,
+ IN VOID *Iterator
);
/**
@@ -882,8 +884,8 @@ JsonObjectIteratorNext (
CHAR8 *
EFIAPI
JsonObjectIteratorKey (
- IN VOID *Iterator
-);
+ IN VOID *Iterator
+ );
/**
Returns the pointer of iterator by key.
@@ -894,8 +896,8 @@ JsonObjectIteratorKey (
VOID *
EFIAPI
JsonObjectKeyToIterator (
- IN CHAR8 *Key
-);
+ IN CHAR8 *Key
+ );
/**
Returns the json type of this json value
@@ -905,7 +907,8 @@ JsonObjectKeyToIterator (
**/
EDKII_JSON_TYPE
EFIAPI
-JsonGetType(
- IN EDKII_JSON_VALUE JsonValue
+JsonGetType (
+ IN EDKII_JSON_VALUE JsonValue
);
+
#endif
diff --git a/RedfishPkg/Include/Library/RedfishContentCodingLib.h b/RedfishPkg/Include/Library/RedfishContentCodingLib.h
index 71a8adcb26..137c39aa7d 100644
--- a/RedfishPkg/Include/Library/RedfishContentCodingLib.h
+++ b/RedfishPkg/Include/Library/RedfishContentCodingLib.h
@@ -6,6 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
+
#ifndef REDFISH_CONTENT_CODING_LIB_H_
#define REDFISH_CONTENT_CODING_LIB_H_
@@ -36,11 +37,11 @@
EFI_STATUS
RedfishContentEncode (
- IN CHAR8 *ContentEncodedValue,
- IN CHAR8 *OriginalContent,
- IN UINTN OriginalContentLength,
- OUT VOID **EncodedContentPointer,
- OUT UINTN *EncodedLength
+ IN CHAR8 *ContentEncodedValue,
+ IN CHAR8 *OriginalContent,
+ IN UINTN OriginalContentLength,
+ OUT VOID **EncodedContentPointer,
+ OUT UINTN *EncodedLength
);
/**
@@ -69,10 +70,11 @@ RedfishContentEncode (
**/
EFI_STATUS
RedfishContentDecode (
- IN CHAR8 *ContentEncodedValue,
- IN VOID *ContentPointer,
- IN UINTN ContentLength,
- OUT VOID **DecodedContentPointer,
- OUT UINTN *DecodedLength
+ IN CHAR8 *ContentEncodedValue,
+ IN VOID *ContentPointer,
+ IN UINTN ContentLength,
+ OUT VOID **DecodedContentPointer,
+ OUT UINTN *DecodedLength
);
+
#endif
diff --git a/RedfishPkg/Include/Library/RedfishCredentialLib.h b/RedfishPkg/Include/Library/RedfishCredentialLib.h
index dac1b3303f..fafe786513 100644
--- a/RedfishPkg/Include/Library/RedfishCredentialLib.h
+++ b/RedfishPkg/Include/Library/RedfishCredentialLib.h
@@ -6,6 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
+
#ifndef REDFISH_CREDENTIAL_LIB_H_
#define REDFISH_CREDENTIAL_LIB_H_
@@ -20,7 +21,7 @@ VOID
EFIAPI
LibCredentialExitBootServicesNotify (
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This
-);
+ );
/**
Notification of End of DXe.
@@ -31,7 +32,7 @@ VOID
EFIAPI
LibCredentialEndOfDxeNotify (
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This
-);
+ );
/**
Retrieve platform's Redfish authentication information.
@@ -64,7 +65,7 @@ LibCredentialGetAuthInfo (
OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,
OUT CHAR8 **UserId,
OUT CHAR8 **Password
-);
+ );
/**
Notify the Redfish service provide to stop provide configuration service to this platform.
@@ -85,7 +86,8 @@ 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
+ );
+
#endif
diff --git a/RedfishPkg/Include/Library/RedfishCrtLib.h b/RedfishPkg/Include/Library/RedfishCrtLib.h
index 5e15768938..23c6acfca3 100644
--- a/RedfishPkg/Include/Library/RedfishCrtLib.h
+++ b/RedfishPkg/Include/Library/RedfishCrtLib.h
@@ -19,74 +19,76 @@
#define MAX_STRING_SIZE 0x10000000
// Minimum value for an object of type long long int.
-#define LLONG_MIN MIN_INT64
+#define LLONG_MIN MIN_INT64
// Maximum value for an object of type long long int.
-#define LLONG_MAX MAX_INT64
+#define LLONG_MAX MAX_INT64
// We dont support double on edk2
-#define HUGE_VAL 0
+#define HUGE_VAL 0
-#if defined(MDE_CPU_X64) || defined(MDE_CPU_AARCH64) || defined(MDE_CPU_RISCV64)
+#if defined (MDE_CPU_X64) || defined (MDE_CPU_AARCH64) || defined (MDE_CPU_RISCV64)
//
// With GCC we would normally use SIXTY_FOUR_BIT_LONG, but MSVC needs
// SIXTY_FOUR_BIT, because 'long' is 32-bit and only 'long long' is
// 64-bit. Since using 'long long' works fine on GCC too, just do that.
//
#define SIXTY_FOUR_BIT
-#elif defined(MDE_CPU_IA32) || defined(MDE_CPU_ARM) || defined(MDE_CPU_EBC)
+#elif defined (MDE_CPU_IA32) || defined (MDE_CPU_ARM) || defined (MDE_CPU_EBC)
#define THIRTY_TWO_BIT
#endif
//
// Map all va_xxxx elements to VA_xxx defined in MdePkg/Include/Base.h
//
-#if !defined(__CC_ARM) // if va_list is not already defined
+#if !defined (__CC_ARM) // if va_list is not already defined
#define va_list VA_LIST
#define va_arg VA_ARG
#define va_start VA_START
#define va_end VA_END
#else // __CC_ARM
-#define va_start(Marker, Parameter) __va_start(Marker, Parameter)
-#define va_arg(Marker, TYPE) __va_arg(Marker, TYPE)
-#define va_end(Marker) ((void)0)
+#define va_start(Marker, Parameter) __va_start(Marker, Parameter)
+#define va_arg(Marker, TYPE) __va_arg(Marker, TYPE)
+#define va_end(Marker) ((void)0)
#endif
//
// Definitions for global constants used by CRT library routines
//
-#define INT_MAX MAX_INT32 /* Maximum (signed) int value */
-#define LONG_MAX 0X7FFFFFFFL /* max value for a long */
-#define LONG_MIN (-LONG_MAX-1) /* min value for a long */
-#define ULONG_MAX 0xFFFFFFFF /* Maximum unsigned long value */
-#define CHAR_BIT 8 /* Number of bits in a char */
+#define INT_MAX MAX_INT32 /* Maximum (signed) int value */
+#define LONG_MAX 0X7FFFFFFFL /* max value for a long */
+#define LONG_MIN (-LONG_MAX-1) /* min value for a long */
+#define ULONG_MAX 0xFFFFFFFF /* Maximum unsigned long value */
+#define CHAR_BIT 8 /* Number of bits in a char */
// Maximum value for an object of type unsigned long long int.
#define ULLONG_MAX 0xFFFFFFFFFFFFFFFFULL // 2^64 - 1
// Maximum value for an object of type unsigned char.
-#define UCHAR_MAX 255 // 2^8 - 1
+#define UCHAR_MAX 255 // 2^8 - 1
//
// Basic types mapping
//
-typedef UINTN size_t;
-typedef INTN ssize_t;
-typedef INT32 time_t;
-typedef UINT8 __uint8_t;
-typedef UINT8 sa_family_t;
-typedef UINT32 uid_t;
-typedef UINT32 gid_t;
-typedef INT32 int32_t;
-typedef UINT32 uint32_t;
-typedef UINT16 uint16_t;
-typedef UINT8 uint8_t;
-typedef enum {false, true} bool;
+typedef UINTN size_t;
+typedef INTN ssize_t;
+typedef INT32 time_t;
+typedef UINT8 __uint8_t;
+typedef UINT8 sa_family_t;
+typedef UINT32 uid_t;
+typedef UINT32 gid_t;
+typedef INT32 int32_t;
+typedef UINT32 uint32_t;
+typedef UINT16 uint16_t;
+typedef UINT8 uint8_t;
+typedef enum {
+ false, true
+} bool;
//
// File operations are not required for EFI building,
// so FILE is mapped to VOID * to pass build
//
-typedef VOID *FILE;
+typedef VOID *FILE;
/**
This is the Redfish version of CRT snprintf function, this function replaces "%s" to
@@ -133,110 +135,406 @@ RedfishAsciiSPrint (
UINTN
EFIAPI
RedfishAsciiVSPrint (
- OUT CHAR8 *StartOfBuffer,
- IN UINTN BufferSize,
- IN CONST CHAR8 *FormatString,
- IN VA_LIST Marker
+ OUT CHAR8 *StartOfBuffer,
+ IN UINTN BufferSize,
+ IN CONST CHAR8 *FormatString,
+ IN VA_LIST Marker
);
//
// Global variables
//
-extern int errno;
-extern FILE *stderr;
+extern int errno;
+extern FILE *stderr;
//
// Function prototypes of CRT Library routines
//
-void *malloc (size_t);
-void *realloc (void *, size_t);
-void *calloc (size_t Num, size_t Size);
-void free (void *);
-void *memset (void *, int, size_t);
-int memcmp (const void *, const void *, size_t);
-int isdigit (int);
-int isspace (int);
-int tolower (int);
-int isupper (int);
-int isxdigit (int);
-int isalnum (int);
-void *memcpy (void *, const void *, size_t);
-void *memset (void *, int, size_t);
-void *memchr (const void *, int, size_t);
-int memcmp (const void *, const void *, size_t);
-void *memmove (void *, const void *, size_t);
-int strcmp (const char *, const char *);
-int strncmp (const char *, const char *, size_t);
-char *strcpy (char *, const char *);
-size_t strlen (const char *);
-char *strcat (char *, const char *);
-char *strchr (const char *, int);
-int strcasecmp (const char *, const char *);
-int strncasecmp (const char *, const char *, size_t);
-char *strncpy (char *, size_t, const char *, size_t);
-int strncmp (const char *, const char *, size_t);
-char *strrchr (const char *, int);
-unsigned long strtoul (const char *, char **, int);
-char * strstr (const char *s1 , const char *s2);
-long strtol (const char *, char **, int);
-char *strerror (int);
-size_t strspn (const char *, const char *);
-char * strdup (const char *str);
-char * strpbrk (const char *s1, const char *s2);
-unsigned long long strtoull(const char * nptr, char ** endptr, int base);
-long long strtoll (const char * nptr, char ** endptr, int base);
-long strtol (const char * nptr, char ** endptr, int base);
-double strtod (const char * __restrict nptr, char ** __restrict endptr);
-size_t strcspn (const char *, const char *);
-int printf (const char *, ...);
-int sscanf (const char *, const char *, ...);
-FILE *fopen (const char *, const char *);
-size_t fread (void *, size_t, size_t, FILE *);
-size_t fwrite (const void *, size_t, size_t, FILE *);
-int fclose (FILE *);
-int fprintf (FILE *, const char *, ...);
-int fgetc (FILE * _File);
-uid_t getuid (void);
-uid_t geteuid (void);
-gid_t getgid (void);
-gid_t getegid (void);
-void qsort (void *, size_t, size_t, int (*)(const void *, const void *));
-char *getenv (const char *);
-#if defined(__GNUC__) && (__GNUC__ >= 2)
-void abort (void) __attribute__((__noreturn__));
+void *
+malloc (
+ size_t
+ );
+
+void *
+realloc (
+ void *,
+ size_t
+ );
+
+void *
+calloc (
+ size_t Num,
+ size_t Size
+ );
+
+void
+free (
+ void *
+ );
+
+void *
+memset (
+ void *,
+ int,
+ size_t
+ );
+
+int
+memcmp (
+ const void *,
+ const void *,
+ size_t
+ );
+
+int
+isdigit (
+ int
+ );
+
+int
+isspace (
+ int
+ );
+
+int
+tolower (
+ int
+ );
+
+int
+isupper (
+ int
+ );
+
+int
+isxdigit (
+ int
+ );
+
+int
+isalnum (
+ int
+ );
+
+void *
+memcpy (
+ void *,
+ const void *,
+ size_t
+ );
+
+void *
+memset (
+ void *,
+ int,
+ size_t
+ );
+
+void *
+memchr (
+ const void *,
+ int,
+ size_t
+ );
+
+int
+memcmp (
+ const void *,
+ const void *,
+ size_t
+ );
+
+void *
+memmove (
+ void *,
+ const void *,
+ size_t
+ );
+
+int
+strcmp (
+ const char *,
+ const char *
+ );
+
+int
+strncmp (
+ const char *,
+ const char *,
+ size_t
+ );
+
+char *
+strcpy (
+ char *,
+ const char *
+ );
+
+size_t
+strlen (
+ const char *
+ );
+
+char *
+strcat (
+ char *,
+ const char *
+ );
+
+char *
+strchr (
+ const char *,
+ int
+ );
+
+int
+strcasecmp (
+ const char *,
+ const char *
+ );
+
+int
+strncasecmp (
+ const char *,
+ const char *,
+ size_t
+ );
+
+char *
+strncpy (
+ char *,
+ size_t,
+ const char *,
+ size_t
+ );
+
+int
+strncmp (
+ const char *,
+ const char *,
+ size_t
+ );
+
+char *
+strrchr (
+ const char *,
+ int
+ );
+
+unsigned long
+strtoul (
+ const char *,
+ char **,
+ int
+ );
+
+char *
+strstr (
+ const char *s1,
+ const char *s2
+ );
+
+long
+strtol (
+ const char *,
+ char **,
+ int
+ );
+
+char *
+strerror (
+ int
+ );
+
+size_t
+strspn (
+ const char *,
+ const char *
+ );
+
+char *
+strdup (
+ const char *str
+ );
+
+char *
+strpbrk (
+ const char *s1,
+ const char *s2
+ );
+
+unsigned long long
+strtoull (
+ const char *nptr,
+ char **endptr,
+ int base
+ );
+
+long long
+strtoll (
+ const char *nptr,
+ char **endptr,
+ int base
+ );
+
+long
+strtol (
+ const char *nptr,
+ char **endptr,
+ int base
+ );
+
+double
+strtod (
+ const char *__restrict nptr,
+ char **__restrict endptr
+ );
+
+size_t
+strcspn (
+ const char *,
+ const char *
+ );
+
+int
+printf (
+ const char *,
+ ...
+ );
+
+int
+sscanf (
+ const char *,
+ const char *,
+ ...
+ );
+
+FILE *
+fopen (
+ const char *,
+ const char *
+ );
+
+size_t
+fread (
+ void *,
+ size_t,
+ size_t,
+ FILE *
+ );
+
+size_t
+fwrite (
+ const void *,
+ size_t,
+ size_t,
+ FILE *
+ );
+
+int
+fclose (
+ FILE *
+ );
+
+int
+fprintf (
+ FILE *,
+ const char *,
+ ...
+ );
+
+int
+fgetc (
+ FILE *_File
+ );
+
+uid_t
+getuid (
+ void
+ );
+
+uid_t
+geteuid (
+ void
+ );
+
+gid_t
+getgid (
+ void
+ );
+
+gid_t
+getegid (
+ void
+ );
+
+void
+qsort (
+ void *,
+ size_t,
+ size_t,
+ int (*)(const void *, const void *)
+ );
+
+char *
+getenv (
+ const char *
+ );
+
+#if defined (__GNUC__) && (__GNUC__ >= 2)
+void
+abort (
+ void
+ ) __attribute__ ((__noreturn__));
+
#else
-void abort (void);
+void
+abort (
+ void
+ );
+
#endif
-int toupper (int);
-int Digit2Val (int);
-time_t time (time_t *);
+int
+toupper (
+ int
+ );
+
+int
+Digit2Val (
+ int
+ );
+
+time_t
+time (
+ time_t *
+ );
//
// Macros that directly map functions to BaseLib, BaseMemoryLib, and DebugLib functions
//
-#define strcmp AsciiStrCmp
-#define memcpy(dest,source,count) CopyMem(dest,source,(UINTN)(count))
-#define memset(dest,ch,count) SetMem(dest,(UINTN)(count),(UINT8)(ch))
-#define memchr(buf,ch,count) ScanMem8(buf,(UINTN)(count),(UINT8)ch)
-#define memcmp(buf1,buf2,count) (int)(CompareMem(buf1,buf2,(UINTN)(count)))
-#define memmove(dest,source,count) CopyMem(dest,source,(UINTN)(count))
-#define strlen(str) (size_t)(AsciiStrnLenS(str,MAX_STRING_SIZE))
-#define strcpy(strDest,strSource) AsciiStrCpyS(strDest,(strlen(strSource)+1),strSource)
-#define strncpy(strDest,strSource,count) AsciiStrnCpyS(strDest,(UINTN)count,strSource,(UINTN)count)
-#define strncpys(strDest, DestLen, strSource,count) AsciiStrnCpyS(strDest,DestLen,strSource,(UINTN)count)
-#define strcat(strDest,strSource) AsciiStrCatS(strDest,(strlen(strSource)+strlen(strDest)+1),strSource)
-#define strchr(str,ch) ScanMem8((VOID *)(str),AsciiStrSize(str),(UINT8)ch)
-#define strcasecmp(str1,str2) (int)AsciiStriCmp(str1,str2)
-#define strstr(s1,s2) AsciiStrStr(s1,s2)
-#define snprintf(buf,len,...) RedfishAsciiSPrint(buf,len,__VA_ARGS__)
-#define vsnprintf(buf,len,format,marker) RedfishAsciiVSPrint((buf),(len),(format),(marker))
-#define assert(expression) ASSERT(expression)
-#define offsetof(type,member) OFFSET_OF(type,member)
-
-#define EOF (-1)
+#define strcmp AsciiStrCmp
+#define memcpy(dest, source, count) CopyMem(dest,source,(UINTN)(count))
+#define memset(dest, ch, count) SetMem(dest,(UINTN)(count),(UINT8)(ch))
+#define memchr(buf, ch, count) ScanMem8(buf,(UINTN)(count),(UINT8)ch)
+#define memcmp(buf1, buf2, count) (int)(CompareMem(buf1,buf2,(UINTN)(count)))
+#define memmove(dest, source, count) CopyMem(dest,source,(UINTN)(count))
+#define strlen(str) (size_t)(AsciiStrnLenS(str,MAX_STRING_SIZE))
+#define strcpy(strDest, strSource) AsciiStrCpyS(strDest,(strlen(strSource)+1),strSource)
+#define strncpy(strDest, strSource, count) AsciiStrnCpyS(strDest,(UINTN)count,strSource,(UINTN)count)
+#define strncpys(strDest, DestLen, strSource, count) AsciiStrnCpyS(strDest,DestLen,strSource,(UINTN)count)
+#define strcat(strDest, strSource) AsciiStrCatS(strDest,(strlen(strSource)+strlen(strDest)+1),strSource)
+#define strchr(str, ch) ScanMem8((VOID *)(str),AsciiStrSize(str),(UINT8)ch)
+#define strcasecmp(str1, str2) (int)AsciiStriCmp(str1,str2)
+#define strstr(s1, s2) AsciiStrStr(s1,s2)
+#define snprintf(buf, len, ...) RedfishAsciiSPrint(buf,len,__VA_ARGS__)
+#define vsnprintf(buf, len, format, marker) RedfishAsciiVSPrint((buf),(len),(format),(marker))
+#define assert(expression) ASSERT(expression)
+#define offsetof(type, member) OFFSET_OF(type,member)
+
+#define EOF (-1)
extern int errno;
-#define ERANGE 34 /* 34 Result too large */
+#define ERANGE 34 /* 34 Result too large */
#endif
diff --git a/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h b/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h
index ad134e8f9b..8d8389b964 100644
--- a/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h
+++ b/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h
@@ -6,6 +6,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
+
#ifndef REDFISH_HOST_INTERFACE_LIB_H_
#define REDFISH_HOST_INTERFACE_LIB_H_
@@ -27,9 +28,10 @@
**/
EFI_STATUS
RedfishPlatformHostInterfaceDeviceDescriptor (
- IN UINT8 *DeviceType,
+ IN UINT8 *DeviceType,
OUT REDFISH_INTERFACE_DATA **DeviceDescriptor
-);
+ );
+
/**
Get platform Redfish host interface protocol data.
Caller should pass NULL in ProtocolRecord to retrive the first protocol record.
@@ -46,7 +48,8 @@ RedfishPlatformHostInterfaceDeviceDescriptor (
**/
EFI_STATUS
RedfishPlatformHostInterfaceProtocolData (
- IN OUT MC_HOST_INTERFACE_PROTOCOL_RECORD **ProtocolRecord,
- IN UINT8 IndexOfProtocolData
-);
+ IN OUT MC_HOST_INTERFACE_PROTOCOL_RECORD **ProtocolRecord,
+ IN UINT8 IndexOfProtocolData
+ );
+
#endif
diff --git a/RedfishPkg/Include/Library/RestExLib.h b/RedfishPkg/Include/Library/RestExLib.h
index 80233fb21c..bc4e4ca6ca 100644
--- a/RedfishPkg/Include/Library/RestExLib.h
+++ b/RedfishPkg/Include/Library/RestExLib.h
@@ -32,11 +32,11 @@
**/
EFI_STATUS
RestExLibCreateChild (
- IN EFI_HANDLE Image,
+ IN EFI_HANDLE Image,
IN EFI_REST_EX_SERVICE_ACCESS_MODE AccessMode,
- IN EFI_REST_EX_CONFIG_TYPE ConfigType,
- IN EFI_REST_EX_SERVICE_TYPE ServiceType,
- OUT EFI_HANDLE *ChildInstanceHandle
-);
+ IN EFI_REST_EX_CONFIG_TYPE ConfigType,
+ IN EFI_REST_EX_SERVICE_TYPE ServiceType,
+ OUT EFI_HANDLE *ChildInstanceHandle
+ );
#endif
diff --git a/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h b/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h
index 89de3b1a21..91b1198297 100644
--- a/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h
+++ b/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h
@@ -21,8 +21,8 @@ typedef enum {
} DEVICE_PATH_MATCH_MODE;
typedef struct {
- UINT32 DevicePathMatchMode;
- UINT32 DevicePathNum;
+ UINT32 DevicePathMatchMode;
+ UINT32 DevicePathNum;
//
// Example:
// {DEVICE_PATH("PciRoot(0)/Pci(0,0)/MAC(005056C00002,0x1)")}
@@ -32,7 +32,7 @@ typedef struct {
// 0x03,0x0b,0x25,0x00,0x00,0x50,0x56,0xc0,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
// 0x7f,0xff,0x04,0x00}
//
- EFI_DEVICE_PATH_PROTOCOL DevicePath[];
+ EFI_DEVICE_PATH_PROTOCOL DevicePath[];
} REST_EX_SERVICE_DEVICE_PATH_DATA;
#endif
diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h b/RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h
index bbd60ed6bd..6604322865 100644
--- a/RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h
+++ b/RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h
@@ -19,15 +19,15 @@ typedef struct _EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL EDKII_REDFISH_CONFIG_HANDL
}
typedef struct {
- EFI_HANDLE RedfishServiceRestExHandle; ///< REST EX EFI handle associated with this Redfish service.
- UINTN RedfishServiceVersion; ///< Redfish service version.
- CHAR16 *RedfishServiceLocation; ///< Redfish service location.
- CHAR16 *RedfishServiceUuid; ///< Redfish service UUID.
- CHAR16 *RedfishServiceOs; ///< Redfish service OS.
- CHAR16 *RedfishServiceOsVersion; ///< Redfish service OS version.
- CHAR16 *RedfishServiceProduct; ///< Redfish service product name.
- CHAR16 *RedfishServiceProductVer; ///< Redfish service product version.
- BOOLEAN RedfishServiceUseHttps; ///< Redfish service uses HTTPS.
+ EFI_HANDLE RedfishServiceRestExHandle; ///< REST EX EFI handle associated with this Redfish service.
+ UINTN RedfishServiceVersion; ///< Redfish service version.
+ CHAR16 *RedfishServiceLocation; ///< Redfish service location.
+ CHAR16 *RedfishServiceUuid; ///< Redfish service UUID.
+ CHAR16 *RedfishServiceOs; ///< Redfish service OS.
+ CHAR16 *RedfishServiceOsVersion; ///< Redfish service OS version.
+ CHAR16 *RedfishServiceProduct; ///< Redfish service product name.
+ CHAR16 *RedfishServiceProductVer; ///< Redfish service product version.
+ BOOLEAN RedfishServiceUseHttps; ///< Redfish service uses HTTPS.
} REDFISH_CONFIG_SERVICE_INFORMATION;
/**
@@ -47,7 +47,7 @@ typedef struct {
**/
typedef
EFI_STATUS
-(EFIAPI *EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_INIT) (
+(EFIAPI *EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_INIT)(
IN EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL *This,
IN REDFISH_CONFIG_SERVICE_INFORMATION *RedfishServiceinfo
);
@@ -63,16 +63,15 @@ EFI_STATUS
**/
typedef
EFI_STATUS
-(EFIAPI *EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_STOP) (
+(EFIAPI *EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_STOP)(
IN EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL *This
);
struct _EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL {
- EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_INIT Init;
- EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_STOP Stop;
+ EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_INIT Init;
+ EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_STOP Stop;
};
-
-extern EFI_GUID gdkIIRedfishConfigHandlerProtocolGuid;
+extern EFI_GUID gdkIIRedfishConfigHandlerProtocolGuid;
#endif
diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h b/RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h
index 34e33b1e00..6aaf9fcde9 100644
--- a/RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h
+++ b/RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h
@@ -34,7 +34,6 @@ typedef enum {
ServiceStopTypeMax
} EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE;
-
/**
Retrieve platform's Redfish authentication information.
@@ -61,7 +60,7 @@ typedef enum {
**/
typedef
EFI_STATUS
-(EFIAPI *EDKII_REDFISH_CREDENTIAL_PROTOCOL_GET_AUTH_INFO) (
+(EFIAPI *EDKII_REDFISH_CREDENTIAL_PROTOCOL_GET_AUTH_INFO)(
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,
OUT CHAR8 **UserId,
@@ -86,16 +85,16 @@ EFI_STATUS
**/
typedef
EFI_STATUS
-(EFIAPI *EDKII_REDFISH_CREDENTIAL_PROTOCOL_STOP_SERVICE) (
+(EFIAPI *EDKII_REDFISH_CREDENTIAL_PROTOCOL_STOP_SERVICE)(
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType
);
struct _EDKII_REDFISH_CREDENTIAL_PROTOCOL {
- EDKII_REDFISH_CREDENTIAL_PROTOCOL_GET_AUTH_INFO GetAuthInfo;
- EDKII_REDFISH_CREDENTIAL_PROTOCOL_STOP_SERVICE StopService;
+ EDKII_REDFISH_CREDENTIAL_PROTOCOL_GET_AUTH_INFO GetAuthInfo;
+ EDKII_REDFISH_CREDENTIAL_PROTOCOL_STOP_SERVICE StopService;
};
-extern EFI_GUID gEdkIIRedfishCredentialProtocolGuid;
+extern EFI_GUID gEdkIIRedfishCredentialProtocolGuid;
#endif