mirror of https://github.com/acidanthera/audk.git
follow up the comments from code review.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5892 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1349236994
commit
55f298c3a3
|
@ -16,7 +16,7 @@
|
|||
#define __HII_LIB_H__
|
||||
|
||||
///
|
||||
/// Limited buffer size recommended by RFC4646 (4.3. Length Considerations)
|
||||
/// Limited buffer size recommended by RFC3066
|
||||
/// (42 characters plus a NULL terminator)
|
||||
///
|
||||
#define RFC_3066_ENTRY_SIZE (42 + 1)
|
||||
|
|
|
@ -373,15 +373,34 @@ BuildMemoryAllocationHob (
|
|||
IN EFI_MEMORY_TYPE MemoryType
|
||||
);
|
||||
|
||||
///
|
||||
/// Get a HOB's type from HOB header
|
||||
///
|
||||
#define GET_HOB_TYPE(Hob) ((Hob).Header->HobType)
|
||||
|
||||
///
|
||||
/// Get a HOB's length from HOB header
|
||||
///
|
||||
#define GET_HOB_LENGTH(Hob) ((Hob).Header->HobLength)
|
||||
|
||||
///
|
||||
/// Get the pointer to next HOB in HOB List
|
||||
///
|
||||
#define GET_NEXT_HOB(Hob) ((Hob).Raw + GET_HOB_LENGTH (Hob))
|
||||
|
||||
///
|
||||
/// Judge if the HOB is the end of HOB List
|
||||
///
|
||||
#define END_OF_HOB_LIST(Hob) (GET_HOB_TYPE (Hob) == (UINT16)EFI_HOB_TYPE_END_OF_HOB_LIST)
|
||||
|
||||
//
|
||||
// Get the data and data size field of GUID
|
||||
//
|
||||
///
|
||||
/// Get the pointer to data field of GUID HOB
|
||||
///
|
||||
#define GET_GUID_HOB_DATA(GuidHob) ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID)))
|
||||
|
||||
///
|
||||
/// Get the data size of GUID HOB
|
||||
///
|
||||
#define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE))
|
||||
|
||||
#endif
|
||||
|
|
|
@ -39,10 +39,10 @@
|
|||
#define UEFI_LANGUAGE_VARIABLE L"PlatformLang"
|
||||
#define UEFI_LANGUAGE_CODES_VARIABLE L"PlatformLangCodes"
|
||||
|
||||
//
|
||||
// Limited buffer size recommended by RFC4646 (4.3. Length Considerations)
|
||||
// (42 characters plus a NULL terminator)
|
||||
//
|
||||
///
|
||||
/// Limited buffer size recommended by RFC3066
|
||||
/// (42 characters plus a NULL terminator)
|
||||
///
|
||||
#define RFC_3066_ENTRY_SIZE (42 + 1)
|
||||
#define ISO_639_2_ENTRY_SIZE 3
|
||||
|
||||
|
@ -51,9 +51,6 @@
|
|||
#define QUESTION_FLAGS (EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_OPTIONS_ONLY)
|
||||
#define QUESTION_FLAGS_MASK (~QUESTION_FLAGS)
|
||||
|
||||
extern EFI_HII_DATABASE_PROTOCOL *gIfrLibHiiDatabase;
|
||||
extern EFI_HII_STRING_PROTOCOL *gIfrLibHiiString;
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
EFI_STRING_ID StringToken;
|
||||
|
@ -554,7 +551,7 @@ EFIAPI
|
|||
ConstructConfigHdr (
|
||||
IN OUT CHAR16 *ConfigHdr,
|
||||
IN OUT UINTN *StrBufferLen,
|
||||
IN EFI_GUID *Guid,
|
||||
IN CONST EFI_GUID *Guid,
|
||||
IN CHAR16 *Name, OPTIONAL
|
||||
IN EFI_HANDLE *DriverHandle
|
||||
)
|
||||
|
@ -576,8 +573,8 @@ BOOLEAN
|
|||
EFIAPI
|
||||
FindBlockName (
|
||||
IN OUT CHAR16 *String,
|
||||
UINTN Offset,
|
||||
UINTN Width
|
||||
IN UINTN Offset,
|
||||
IN UINTN Width
|
||||
)
|
||||
;
|
||||
|
||||
|
@ -601,10 +598,10 @@ FindBlockName (
|
|||
EFI_STATUS
|
||||
EFIAPI
|
||||
GetBrowserData (
|
||||
EFI_GUID *VariableGuid, OPTIONAL
|
||||
CHAR16 *VariableName, OPTIONAL
|
||||
UINTN *BufferSize,
|
||||
UINT8 *Buffer
|
||||
IN CONST EFI_GUID *VariableGuid, OPTIONAL
|
||||
IN CONST CHAR16 *VariableName, OPTIONAL
|
||||
IN OUT UINTN *BufferSize,
|
||||
IN OUT UINT8 *Buffer
|
||||
)
|
||||
;
|
||||
|
||||
|
@ -630,11 +627,11 @@ GetBrowserData (
|
|||
EFI_STATUS
|
||||
EFIAPI
|
||||
SetBrowserData (
|
||||
EFI_GUID *VariableGuid, OPTIONAL
|
||||
CHAR16 *VariableName, OPTIONAL
|
||||
UINTN BufferSize,
|
||||
UINT8 *Buffer,
|
||||
CHAR16 *RequestElement OPTIONAL
|
||||
IN CONST EFI_GUID *VariableGuid, OPTIONAL
|
||||
IN CONST CHAR16 *VariableName, OPTIONAL
|
||||
IN UINTN BufferSize,
|
||||
IN CONST UINT8 *Buffer,
|
||||
IN CONST CHAR16 *RequestElement OPTIONAL
|
||||
)
|
||||
;
|
||||
|
||||
|
|
|
@ -566,7 +566,7 @@ EFIAPI
|
|||
ConstructConfigHdr (
|
||||
IN OUT CHAR16 *ConfigHdr,
|
||||
IN OUT UINTN *StrBufferLen,
|
||||
IN EFI_GUID *Guid,
|
||||
IN CONST EFI_GUID *Guid,
|
||||
IN CHAR16 *Name, OPTIONAL
|
||||
IN EFI_HANDLE *DriverHandle
|
||||
)
|
||||
|
@ -657,8 +657,8 @@ BOOLEAN
|
|||
EFIAPI
|
||||
FindBlockName (
|
||||
IN OUT CHAR16 *String,
|
||||
UINTN Offset,
|
||||
UINTN Width
|
||||
IN UINTN Offset,
|
||||
IN UINTN Width
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
@ -727,10 +727,10 @@ FindBlockName (
|
|||
EFI_STATUS
|
||||
EFIAPI
|
||||
GetBrowserData (
|
||||
EFI_GUID *VariableGuid, OPTIONAL
|
||||
CHAR16 *VariableName, OPTIONAL
|
||||
UINTN *BufferSize,
|
||||
UINT8 *Buffer
|
||||
IN CONST EFI_GUID *VariableGuid, OPTIONAL
|
||||
IN CONST CHAR16 *VariableName, OPTIONAL
|
||||
IN OUT UINTN *BufferSize,
|
||||
IN OUT UINT8 *Buffer
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
@ -844,11 +844,11 @@ GetBrowserData (
|
|||
EFI_STATUS
|
||||
EFIAPI
|
||||
SetBrowserData (
|
||||
EFI_GUID *VariableGuid, OPTIONAL
|
||||
CHAR16 *VariableName, OPTIONAL
|
||||
UINTN BufferSize,
|
||||
UINT8 *Buffer,
|
||||
CHAR16 *RequestElement OPTIONAL
|
||||
IN CONST EFI_GUID *VariableGuid, OPTIONAL
|
||||
IN CONST CHAR16 *VariableName, OPTIONAL
|
||||
IN UINTN BufferSize,
|
||||
IN CONST UINT8 *Buffer,
|
||||
IN CONST CHAR16 *RequestElement OPTIONAL
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
@ -860,7 +860,7 @@ SetBrowserData (
|
|||
CHAR16 *Progress;
|
||||
CHAR16 BlockName[33];
|
||||
CHAR16 *ConfigRequest;
|
||||
CHAR16 *Request;
|
||||
CONST CHAR16 *Request;
|
||||
|
||||
//
|
||||
// Locate protocols for use
|
||||
|
|
Loading…
Reference in New Issue