diff options
author | Liming Gao <liming.gao@intel.com> | 2018-06-27 21:08:52 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-06-28 11:19:45 +0800 |
commit | d1102dba7210b95e41d06c2338a22ba6af248645 (patch) | |
tree | 8b4af076b5d6f2aa7f35563d4defcca4d4bfdd87 /MdeModulePkg/Universal/HiiDatabaseDxe | |
parent | ca79bab7af4770c5eb578f6d495af01705aedb79 (diff) | |
download | edk2-d1102dba7210b95e41d06c2338a22ba6af248645.zip edk2-d1102dba7210b95e41d06c2338a22ba6af248645.tar.gz edk2-d1102dba7210b95e41d06c2338a22ba6af248645.tar.bz2 |
MdeModulePkg: Clean up source files
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe')
11 files changed, 458 insertions, 458 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c index 5d5f17f..2504597 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c @@ -1,7 +1,7 @@ /** @file
Implementation of interfaces function for EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL.
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -109,7 +109,7 @@ ExtractDevicePath ( if (((Length + 1) / 2) < sizeof (EFI_DEVICE_PATH_PROTOCOL)) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// The data in <PathHdr> is encoded as hex UNICODE %02x bytes in the same order
// as the device path resides in RAM memory.
@@ -119,7 +119,7 @@ ExtractDevicePath ( if (DevicePathBuffer == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
//
// Convert DevicePath
//
@@ -133,7 +133,7 @@ ExtractDevicePath ( DevicePathBuffer [Index/2] = (UINT8) ((DevicePathBuffer [Index/2] << 4) + DigitUint8);
}
}
-
+
//
// Validate DevicePath
//
@@ -209,7 +209,7 @@ ExtractNameSpace ( TmpPtr = StrStr (String, L"&");
if (TmpPtr != NULL) {
- *TmpPtr = 0;
+ *TmpPtr = 0;
}
if (NextString != NULL) {
*NextString = String + StrLen (String);
@@ -227,7 +227,7 @@ ExtractNameSpace ( UnicodeStrToAsciiStrS (String, *NameSpace, NameSpaceSize);
if (TmpPtr != NULL) {
- *TmpPtr = L'&';
+ *TmpPtr = L'&';
}
return EFI_SUCCESS;
@@ -256,7 +256,7 @@ ExtractKeyword ( EFI_STRING TmpPtr;
ASSERT ((Keyword != NULL) && (NextString != NULL));
-
+
TmpPtr = NULL;
//
@@ -280,10 +280,10 @@ ExtractKeyword ( }
String += StrLen (L"KEYWORD=");
-
+
TmpPtr = StrStr (String, L"&");
if (TmpPtr != NULL) {
- *TmpPtr = 0;
+ *TmpPtr = 0;
}
*NextString = String + StrLen (String);
@@ -295,7 +295,7 @@ ExtractKeyword ( if (TmpPtr != NULL) {
*TmpPtr = L'&';
}
-
+
return EFI_SUCCESS;
}
@@ -335,10 +335,10 @@ ExtractValue ( }
String += StrLen (L"VALUE=");
-
+
TmpPtr = StrStr (String, L"&");
if (TmpPtr != NULL) {
- *TmpPtr = 0;
+ *TmpPtr = 0;
}
*NextString = String + StrLen (String);
@@ -350,7 +350,7 @@ ExtractValue ( if (TmpPtr != NULL) {
*TmpPtr = L'&';
}
-
+
return EFI_SUCCESS;
}
@@ -376,7 +376,7 @@ ExtractFilter ( {
CHAR16 *PathPtr;
CHAR16 *KeywordPtr;
- BOOLEAN RetVal;
+ BOOLEAN RetVal;
ASSERT ((FilterFlags != NULL) && (NextString != NULL));
@@ -387,7 +387,7 @@ ExtractFilter ( *NextString = NULL;
return FALSE;
}
-
+
*FilterFlags = 0;
RetVal = TRUE;
@@ -558,7 +558,7 @@ ValidateFilter ( //
// Get ReadOnly flag from Question.
- //
+ //
*ReadOnly = ExtractReadOnlyFromOpCode(OpCodeData);
while (ExtractFilter (StringPtr, &FilterFlags, &NextFilter)) {
@@ -653,7 +653,7 @@ ValidateFilter ( //
StringPtr = NextFilter;
}
-
+
Done:
//
// The current filter which is processing.
@@ -702,14 +702,14 @@ GetRecordFromDevicePath ( }
/**
- Calculate the size of StringSrc and output it. Also copy string text from src
+ Calculate the size of StringSrc and output it. Also copy string text from src
to dest.
This is a internal function.
@param StringSrc Points to current null-terminated string.
@param BufferSize Length of the buffer.
- @param StringDest Buffer to store the string text.
+ @param StringDest Buffer to store the string text.
@retval EFI_SUCCESS The string text was outputted successfully.
@retval EFI_OUT_OF_RESOURCES Out of resource.
@@ -738,7 +738,7 @@ GetUnicodeStringTextAndSize ( if (*StringDest == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
CopyMem (*StringDest, StringSrc, StringSize);
*BufferSize = StringSize;
@@ -1067,7 +1067,7 @@ GetNextStringId ( case EFI_HII_SIBT_STRING_SCSU:
Offset = sizeof (EFI_HII_STRING_BLOCK);
StringTextPtr = BlockHdr + Offset;
-
+
if (FindString) {
StringSize = AsciiStrSize ((CHAR8 *) StringTextPtr);
*KeywordValue = AllocatePool (StringSize * sizeof (CHAR16));
@@ -1087,7 +1087,7 @@ GetNextStringId ( case EFI_HII_SIBT_STRING_SCSU_FONT:
Offset = sizeof (EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK) - sizeof (UINT8);
StringTextPtr = BlockHdr + Offset;
-
+
if (FindString) {
StringSize = AsciiStrSize ((CHAR8 *) StringTextPtr);
*KeywordValue = AllocatePool (StringSize * sizeof (CHAR16));
@@ -1205,7 +1205,7 @@ GetNextStringId ( BlockSize += Offset;
CopyMem (&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16));
for (Index = 0; Index < StringCount; Index++) {
- GetUnicodeStringTextAndSize (StringTextPtr, &StringSize, &String);
+ GetUnicodeStringTextAndSize (StringTextPtr, &StringSize, &String);
if (FindString) {
*KeywordValue = String;
@@ -1346,7 +1346,7 @@ GetStringIdFromRecord ( StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE);
if (AsciiStrnCmp(Name, StringPackage->StringPkgHdr->Language, AsciiStrLen (Name)) == 0) {
- Status = GetStringIdFromString (StringPackage, KeywordValue, StringId);
+ Status = GetStringIdFromString (StringPackage, KeywordValue, StringId);
if (EFI_ERROR (Status)) {
return KEYWORD_HANDLER_KEYWORD_NOT_FOUND;
} else {
@@ -1430,10 +1430,10 @@ IsStorageOpCode ( @retval the opcode for the question.
**/
-UINT8 *
+UINT8 *
FindQuestionFromStringId (
IN HII_IFR_PACKAGE_INSTANCE *FormPackage,
- IN EFI_STRING_ID KeywordStrId
+ IN EFI_STRING_ID KeywordStrId
)
{
UINT8 *OpCodeData;
@@ -1530,7 +1530,7 @@ FindStorageFromVarId ( @retval the width info for one question.
**/
-UINT16
+UINT16
GetWidth (
IN UINT8 *OpCodeData
)
@@ -1548,16 +1548,16 @@ GetWidth ( switch (((EFI_IFR_ONE_OF *) OpCodeData)->Flags & EFI_IFR_NUMERIC_SIZE) {
case EFI_IFR_NUMERIC_SIZE_1:
return (UINT16) sizeof (UINT8);
-
+
case EFI_IFR_NUMERIC_SIZE_2:
return (UINT16) sizeof (UINT16);
-
+
case EFI_IFR_NUMERIC_SIZE_4:
return (UINT16) sizeof (UINT32);
-
+
case EFI_IFR_NUMERIC_SIZE_8:
return (UINT16) sizeof (UINT64);
-
+
default:
ASSERT (FALSE);
return 0;
@@ -1572,16 +1572,16 @@ GetWidth ( switch (((EFI_IFR_ONE_OF_OPTION *) NextOpCodeData)->Type) {
case EFI_IFR_TYPE_NUM_SIZE_8:
return (UINT16) sizeof (UINT8) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers;
-
+
case EFI_IFR_TYPE_NUM_SIZE_16:
return (UINT16) sizeof (UINT16) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers ;
-
+
case EFI_IFR_TYPE_NUM_SIZE_32:
return (UINT16) sizeof (UINT32) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers;
-
+
case EFI_IFR_TYPE_NUM_SIZE_64:
return (UINT16) sizeof (UINT64) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers;
-
+
default:
ASSERT (FALSE);
return 0;
@@ -1589,7 +1589,7 @@ GetWidth ( case EFI_IFR_CHECKBOX_OP:
return (UINT16) sizeof (BOOLEAN);
-
+
case EFI_IFR_PASSWORD_OP:
return (UINT16)((UINTN) ((EFI_IFR_PASSWORD *) OpCodeData)->MaxSize * sizeof (CHAR16));
@@ -1648,12 +1648,12 @@ InternalLowerConfigString ( /**
Allocates and returns a Null-terminated Unicode <ConfigHdr> string.
-
+
The format of a <ConfigHdr> is as follows:
GUID=<HexCh>32&NAME=<Char>NameLength&PATH=<HexChar>DevicePathSize<Null>
- @param[in] OpCodeData The opcode for the storage.
+ @param[in] OpCodeData The opcode for the storage.
@param[in] DriverHandle The driver handle which supports a Device Path Protocol
that is the routing information PATH. Each byte of
the Device Path associated with DriverHandle is converted
@@ -1689,17 +1689,17 @@ ConstructConfigHdr ( Guid = (EFI_GUID *)(UINTN *)&((EFI_IFR_VARSTORE *) OpCodeData)->Guid;
AsciiName = (CHAR8 *) ((EFI_IFR_VARSTORE *) OpCodeData)->Name;
break;
-
+
case EFI_IFR_VARSTORE_NAME_VALUE_OP:
Guid = (EFI_GUID *)(UINTN *)&((EFI_IFR_VARSTORE_NAME_VALUE *) OpCodeData)->Guid;
AsciiName = NULL;
break;
-
+
case EFI_IFR_VARSTORE_EFI_OP:
Guid = (EFI_GUID *)(UINTN *)&((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Guid;
AsciiName = (CHAR8 *) ((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Name;
break;
-
+
default:
ASSERT (FALSE);
Guid = NULL;
@@ -1717,7 +1717,7 @@ ConstructConfigHdr ( }
//
- // Compute the length of Name in Unicode characters.
+ // Compute the length of Name in Unicode characters.
// If Name is NULL, then the length is 0.
//
NameLength = 0;
@@ -1773,7 +1773,7 @@ ConstructConfigHdr ( String += StrnLenS (String, MaxLen - ((UINTN)String - (UINTN)ReturnString) / sizeof (CHAR16));
}
}
-
+
//
// Append L"&NAME="
//
@@ -1841,12 +1841,12 @@ EFI_STRING ConstructRequestElement (
IN CHAR16 *Name,
IN UINT16 Offset,
- IN UINT16 Width
+ IN UINT16 Width
)
{
CHAR16 *StringPtr;
UINTN Length;
-
+
if (Name != NULL) {
//
// Add <BlockName> length for each Name
@@ -1886,10 +1886,10 @@ ConstructRequestElement ( // Append OFFSET=XXXX&WIDTH=YYYY\0
//
UnicodeSPrint (
- StringPtr,
- (7 + 4 + 7 + 4 + 1) * sizeof (CHAR16),
- L"OFFSET=%04X&WIDTH=%04X",
- Offset,
+ StringPtr,
+ (7 + 4 + 7 + 4 + 1) * sizeof (CHAR16),
+ L"OFFSET=%04X&WIDTH=%04X",
+ Offset,
Width
);
}
@@ -1922,7 +1922,7 @@ GetNameFromId ( Name = NULL;
BestLanguage = NULL;
- PlatformLanguage = NULL;
+ PlatformLanguage = NULL;
SupportedLanguages = NULL;
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatformLanguage, NULL);
@@ -1932,10 +1932,10 @@ GetNameFromId ( // Get the best matching language from SupportedLanguages
//
BestLanguage = GetBestLanguage (
- SupportedLanguages,
+ SupportedLanguages,
FALSE, // RFC 4646 mode
PlatformLanguage != NULL ? PlatformLanguage : "", // Highest priority
- SupportedLanguages, // Lowest priority
+ SupportedLanguages, // Lowest priority
NULL
);
if (BestLanguage == NULL) {
@@ -2013,7 +2013,7 @@ ExtractConfigRequest ( IN EFI_STRING_ID KeywordStrId,
OUT UINT8 **OpCodeData,
OUT EFI_STRING *ConfigRequest
- )
+ )
{
LIST_ENTRY *Link;
HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageListNode;
@@ -2053,7 +2053,7 @@ ExtractConfigRequest ( //
ASSERT (Header->VarStoreId != 0);
DEBUG ((EFI_D_INFO, "Varstore Id: 0x%x\n", Header->VarStoreId));
-
+
Storage = FindStorageFromVarId (FormPackage, Header->VarStoreId);
ASSERT (Storage != NULL);
@@ -2116,7 +2116,7 @@ ExtractConfigResp ( IN EFI_STRING ValueElement,
OUT UINT8 **OpCodeData,
OUT EFI_STRING *ConfigResp
- )
+ )
{
LIST_ENTRY *Link;
HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageListNode;
@@ -2156,7 +2156,7 @@ ExtractConfigResp ( //
ASSERT (Header->VarStoreId != 0);
DEBUG ((EFI_D_INFO, "Varstore Id: 0x%x\n", Header->VarStoreId));
-
+
Storage = FindStorageFromVarId (FormPackage, Header->VarStoreId);
ASSERT (Storage != NULL);
@@ -2341,7 +2341,7 @@ GetStringIdFromDatabase ( *ProgressErr = GetStringIdFromRecord (Record, NameSpace, KeywordData, KeywordStringId);
if (*ProgressErr == KEYWORD_HANDLER_NO_ERROR) {
*DataBaseRecord = Record;
-
+
if ((DevicePathPkg = Record->PackageList->DevicePathPkg) != NULL) {
DestDevicePath = (EFI_DEVICE_PATH_PROTOCOL *) (DevicePathPkg + sizeof (EFI_HII_PACKAGE_HEADER));
DevicePathSize = GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) DestDevicePath);
@@ -2361,7 +2361,7 @@ GetStringIdFromDatabase ( return EFI_OUT_OF_RESOURCES;
} else if (*ProgressErr == KEYWORD_HANDLER_KEYWORD_NOT_FOUND) {
FindNameSpace = TRUE;
- }
+ }
}
//
@@ -2394,7 +2394,7 @@ GetStringIdFromDatabase ( **/
EFI_STATUS
GenerateKeywordResp (
- IN CHAR8 *NameSpace,
+ IN CHAR8 *NameSpace,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN EFI_STRING KeywordData,
IN EFI_STRING ValueStr,
@@ -2510,7 +2510,7 @@ GenerateKeywordResp ( if (PathHdr != NULL) {
FreePool (PathHdr);
}
-
+
return EFI_SUCCESS;
}
@@ -2562,9 +2562,9 @@ MergeToMultiKeywordResp ( }
/**
- Enumerate all keyword in the system.
-
- If error occur when parse one keyword, just skip it and parse the next one.
+ Enumerate all keyword in the system.
+
+ If error occur when parse one keyword, just skip it and parse the next one.
This is a internal function.
@@ -2649,7 +2649,7 @@ EnumerateAllKeywords ( // Any valid string start from 2. so here initial it to 1.
//
NextStringId = 1;
-
+
//
// Enumerate all valid stringid in the package.
//
@@ -2664,7 +2664,7 @@ EnumerateAllKeywords ( //
goto Error;
}
-
+
//
// 3.4 Extract Value for the input keyword.
//
@@ -2698,7 +2698,7 @@ EnumerateAllKeywords ( //
goto Done;
}
-
+
//
// 6. Merge to the MultiKeywordResp string.
//
@@ -2721,7 +2721,7 @@ Error: if (KeywordResp != NULL) {
FreePool (KeywordResp);
KeywordResp = NULL;
- }
+ }
}
if (LocalNameSpace != NULL) {
@@ -2729,7 +2729,7 @@ Error: LocalNameSpace = NULL;
}
}
- }
+ }
}
//
@@ -2746,7 +2746,7 @@ Error: Status = EFI_SUCCESS;
}
*MultiResp = MultiKeywordResp;
-
+
Done:
if (LocalNameSpace != NULL) {
FreePool (LocalNameSpace);
@@ -2766,18 +2766,18 @@ Done: This function accepts a <MultiKeywordResp> formatted string, finds the associated
keyword owners, creates a <MultiConfigResp> string from it and forwards it to the
EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
-
- If there is an issue in resolving the contents of the KeywordString, then the
- function returns an error and also sets the Progress and ProgressErr with the
+
+ If there is an issue in resolving the contents of the KeywordString, then the
+ function returns an error and also sets the Progress and ProgressErr with the
appropriate information about where the issue occurred and additional data about
- the nature of the issue.
-
+ the nature of the issue.
+
In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND
error is generated during processing the second or later keyword element, the system
- storage associated with earlier keywords is not modified. All elements of the
+ storage associated with earlier keywords is not modified. All elements of the
KeywordString must successfully pass all tests for format and access prior to making
any modifications to storage.
-
+
In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString
containing multiple keywords, the state of storage associated with earlier keywords
is undefined.
@@ -2785,18 +2785,18 @@ Done: @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
- @param KeywordString A null-terminated string in <MultiKeywordResp> format.
+ @param KeywordString A null-terminated string in <MultiKeywordResp> format.
- @param Progress On return, points to a character in the KeywordString.
- Points to the string's NULL terminator if the request
- was successful. Points to the most recent '&' before
+ @param Progress On return, points to a character in the KeywordString.
+ Points to the string's NULL terminator if the request
+ was successful. Points to the most recent '&' before
the first failing name / value pair (or the beginning
of the string if the failure is in the first name / value
pair) if the request was not successful.
@param ProgressErr If during the processing of the KeywordString there was
- a failure, this parameter gives additional information
- about the possible source of the problem. The various
+ a failure, this parameter gives additional information
+ about the possible source of the problem. The various
errors are defined in "Related Definitions" below.
@@ -2804,16 +2804,16 @@ Done: @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
1. KeywordString is NULL.
- 2. Parsing of the KeywordString resulted in an
+ 2. Parsing of the KeywordString resulted in an
error. See Progress and ProgressErr for more data.
- @retval EFI_NOT_FOUND An element of the KeywordString was not found.
+ @retval EFI_NOT_FOUND An element of the KeywordString was not found.
See ProgressErr for more data.
- @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
+ @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
See ProgressErr for more data.
-
- @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
+
+ @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
for more data.
@retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
@@ -2821,7 +2821,7 @@ Done: **/
EFI_STATUS
-EFIAPI
+EFIAPI
EfiConfigKeywordHandlerSetData (
IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
IN CONST EFI_STRING KeywordString,
@@ -2974,7 +2974,7 @@ EfiConfigKeywordHandlerSetData ( Status = EFI_ACCESS_DENIED;
goto Done;
}
-
+
//
// 9. Merge to the MultiKeywordResp string.
//
@@ -2991,7 +2991,7 @@ EfiConfigKeywordHandlerSetData ( FreePool (KeywordData);
FreePool (ValueElement);
NameSpace = NULL;
- DevicePath = NULL;
+ DevicePath = NULL;
KeywordData = NULL;
ValueElement = NULL;
if (ConfigResp != NULL) {
@@ -3013,7 +3013,7 @@ EfiConfigKeywordHandlerSetData ( Status = EFI_DEVICE_ERROR;
goto Done;
}
-
+
*ProgressErr = KEYWORD_HANDLER_NO_ERROR;
Done:
@@ -3049,56 +3049,56 @@ Done: /**
- This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
+ This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the
EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
-
+
If there is an issue in resolving the contents of the KeywordString, then the function
returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the
appropriate information about where the issue occurred and additional data about the
nature of the issue.
-
+
In the case when KeywordString is NULL, or contains multiple keywords, or when
EFI_NOT_FOUND is generated while processing the keyword elements, the Results string
- contains values returned for all keywords processed prior to the keyword generating the
+ contains values returned for all keywords processed prior to the keyword generating the
error but no values for the keyword with error or any following keywords.
-
+
@param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
-
+
@param NameSpaceId A null-terminated string containing the platform configuration
language to search through in the system. If a NULL is passed
in, then it is assumed that any platform configuration language
with the prefix of "x-UEFI-" are searched.
-
+
@param KeywordString A null-terminated string in <MultiKeywordRequest> format. If a
- NULL is passed in the KeywordString field, all of the known
- keywords in the system for the NameSpaceId specified are
+ NULL is passed in the KeywordString field, all of the known
+ keywords in the system for the NameSpaceId specified are
returned in the Results field.
-
+
@param Progress On return, points to a character in the KeywordString. Points
- to the string's NULL terminator if the request was successful.
+ to the string's NULL terminator if the request was successful.
Points to the most recent '&' before the first failing name / value
pair (or the beginning of the string if the failure is in the first
name / value pair) if the request was not successful.
-
+
@param ProgressErr If during the processing of the KeywordString there was a
- failure, this parameter gives additional information about the
+ failure, this parameter gives additional information about the
possible source of the problem. See the definitions in SetData()
for valid value definitions.
-
+
@param Results A null-terminated string in <MultiKeywordResp> format is returned
- which has all the values filled in for the keywords in the
+ which has all the values filled in for the keywords in the
KeywordString. This is a callee-allocated field, and must be freed
- by the caller after being used.
+ by the caller after being used.
@retval EFI_SUCCESS The specified action was completed successfully.
-
+
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
1.Progress, ProgressErr, or Results is NULL.
2.Parsing of the KeywordString resulted in an error. See
Progress and ProgressErr for more data.
-
+
@retval EFI_NOT_FOUND An element of the KeywordString was not found. See
ProgressErr for more data.
@@ -3108,7 +3108,7 @@ Done: @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See
ProgressErr for more data.
-
+
@retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for
more data.
@@ -3117,12 +3117,12 @@ Done: **/
EFI_STATUS
-EFIAPI
+EFIAPI
EfiConfigKeywordHandlerGetData (
IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
IN CONST EFI_STRING NameSpaceId, OPTIONAL
IN CONST EFI_STRING KeywordString, OPTIONAL
- OUT EFI_STRING *Progress,
+ OUT EFI_STRING *Progress,
OUT UINT32 *ProgressErr,
OUT EFI_STRING *Results
)
@@ -3132,7 +3132,7 @@ EfiConfigKeywordHandlerGetData ( EFI_DEVICE_PATH_PROTOCOL *DevicePath;
HII_DATABASE_RECORD *DataBaseRecord;
CHAR16 *StringPtr;
- CHAR16 *NextStringPtr;
+ CHAR16 *NextStringPtr;
CHAR16 *KeywordData;
EFI_STRING_ID KeywordStringId;
UINT8 *OpCode;
@@ -3188,7 +3188,7 @@ EfiConfigKeywordHandlerGetData ( return EFI_INVALID_PARAMETER;
}
}
-
+
if (KeywordString != NULL) {
//
// Use temp string to avoid changing input string buffer.
@@ -3208,7 +3208,7 @@ EfiConfigKeywordHandlerGetData ( }
StringPtr = NextStringPtr;
-
+
//
// 3. Process Keyword section from the input keywordRequest string.
//
@@ -3240,7 +3240,7 @@ EfiConfigKeywordHandlerGetData ( if (EFI_ERROR (Status)) {
goto Done;
}
-
+
//
// 3.4 Extract Value for the input keyword.
//
@@ -3293,7 +3293,7 @@ EfiConfigKeywordHandlerGetData ( FreePool (KeywordData);
FreePool (ValueElement);
FreePool (ConfigRequest);
- DevicePath = NULL;
+ DevicePath = NULL;
KeywordData = NULL;
ValueElement = NULL;
ConfigRequest = NULL;
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index 646864f..c778cd9 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -1,7 +1,7 @@ /** @file
Implementation of interfaces function for EFI_HII_CONFIG_ROUTING_PROTOCOL.
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -44,7 +44,7 @@ CalculateConfigStringLen ( //
// The beginning of next <ConfigRequest>/<ConfigResp> should be "&GUID=".
// Will meet '\0' if there is only one <ConfigRequest>/<ConfigResp>.
- //
+ //
TmpPtr = StrStr (String, L"&GUID=");
if (TmpPtr == NULL) {
return StrLen (String);
@@ -117,7 +117,7 @@ GetDevicePath ( if (((Length + 1) / 2) < sizeof (EFI_DEVICE_PATH_PROTOCOL)) {
return EFI_NOT_FOUND;
}
-
+
//
// The data in <PathHdr> is encoded as hex UNICODE %02x bytes in the same order
// as the device path resides in RAM memory.
@@ -127,7 +127,7 @@ GetDevicePath ( if (DevicePathBuffer == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
//
// Convert DevicePath
//
@@ -141,7 +141,7 @@ GetDevicePath ( DevicePathBuffer [Index/2] = (UINT8) ((DevicePathBuffer [Index/2] << 4) + DigitUint8);
}
}
-
+
//
// Validate DevicePath
//
@@ -208,10 +208,10 @@ HiiToLower ( @param BufferLen The length of the Buffer in bytes.
- @param Buffer Points to a buffer which will be converted to be the
+ @param Buffer Points to a buffer which will be converted to be the
content of the generated string.
- @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
+ @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
UINT8 *; if 2, the buffer contains unicode string for the value of NAME;
if 3, the buffer contains other data.
@@ -244,7 +244,7 @@ GenerateSubStr ( ASSERT (*SubStr != NULL);
return;
}
-
+
//
// Header + Data + '&' + '\0'
//
@@ -317,7 +317,7 @@ GenerateSubStr ( //
// Convert the uppercase to lowercase since <HexAf> is defined in lowercase format.
//
- StrCatS (Str, Length, L"&");
+ StrCatS (Str, Length, L"&");
HiiToLower (Str);
*SubStr = Str;
@@ -352,7 +352,7 @@ OutputConfigBody ( if (String == NULL || ConfigBody == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// The setting information should start OFFSET, not ALTCFG.
//
@@ -506,7 +506,7 @@ GetValueOfNumber ( Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
-
+
Length = *Len;
ZeroMem (TemStr, sizeof (TemStr));
for (Index = 0; Index < Length; Index ++) {
@@ -1010,10 +1010,10 @@ Exit: the missing AltCfgId in AltCfgResq.
@param AltCfgResp Pointer to a null-terminated Unicode string in
- <ConfigAltResp> format. The default value string
- will be merged into it.
+ <ConfigAltResp> format. The default value string
+ will be merged into it.
@param DefaultAltCfgResp Pointer to a null-terminated Unicode string in
- <MultiConfigAltResp> format. The default value
+ <MultiConfigAltResp> format. The default value
string may contain more than one ConfigAltResp
string for the different varstore buffer.
@@ -1036,17 +1036,17 @@ MergeDefaultString ( UINTN SizeAltCfgResp;
UINTN MaxLen;
UINTN TotalSize;
-
+
if (*AltCfgResp == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
//
// Get the request ConfigHdr
//
SizeAltCfgResp = 0;
StringPtr = *AltCfgResp;
-
+
//
// Find <ConfigHdr> GUID=...&NAME=...&PATH=...
//
@@ -1081,18 +1081,18 @@ MergeDefaultString ( StrnCatS (AltConfigHdr, MaxLen, *AltCfgResp, HeaderLength);
StrCatS (AltConfigHdr, MaxLen, L"&ALTCFG=");
HeaderLength = StrLen (AltConfigHdr);
-
+
StringPtrDefault = StrStr (DefaultAltCfgResp, AltConfigHdr);
while (StringPtrDefault != NULL) {
//
// Get AltCfg Name
//
StrnCatS (AltConfigHdr, MaxLen, StringPtrDefault + HeaderLength, 4);
- StringPtr = StrStr (*AltCfgResp, AltConfigHdr);
-
+ StringPtr = StrStr (*AltCfgResp, AltConfigHdr);
+
//
// Append the found default value string to the input AltCfgResp
- //
+ //
if (StringPtr == NULL) {
StringPtrEnd = StrStr (StringPtrDefault + 1, L"&GUID");
SizeAltCfgResp = StrSize (*AltCfgResp);
@@ -1136,16 +1136,16 @@ MergeDefaultString ( //
CompareAndMergeDefaultString (AltCfgResp, DefaultAltCfgResp, AltConfigHdr);
}
-
+
//
// Find next AltCfg String
//
*(AltConfigHdr + HeaderLength) = L'\0';
StringPtrDefault = StrStr (StringPtrDefault + 1, AltConfigHdr);
}
-
+
FreePool (AltConfigHdr);
- return EFI_SUCCESS;
+ return EFI_SUCCESS;
}
/**
@@ -1162,9 +1162,9 @@ InsertDefaultValue ( )
{
LIST_ENTRY *Link;
- IFR_DEFAULT_DATA *DefaultValueArray;
+ IFR_DEFAULT_DATA *DefaultValueArray;
LIST_ENTRY *DefaultLink;
-
+
DefaultLink = &BlockData->DefaultValueEntry;
for (Link = DefaultLink->ForwardLink; Link != DefaultLink; Link = Link->ForwardLink) {
@@ -1183,7 +1183,7 @@ InsertDefaultValue ( DefaultValueArray->Cleaned = DefaultValueData->Cleaned;
}
return;
- }
+ }
}
//
@@ -1200,7 +1200,7 @@ InsertDefaultValue ( @param BlockLink The list entry points to block array.
@param BlockData The point to BlockData is added.
-
+
**/
VOID
InsertBlockData (
@@ -1245,26 +1245,26 @@ InsertBlockData ( }
} else if (BlockArray->Offset > BlockSingleData->Offset) {
//
- // Insert new block data in the front of block array
+ // Insert new block data in the front of block array
//
InsertTailList (Link, &BlockSingleData->Entry);
return;
}
}
-
+
//
// Add new block data into the tail.
//
- InsertTailList (Link, &BlockSingleData->Entry);
+ InsertTailList (Link, &BlockSingleData->Entry);
}
/**
- Retrieves a pointer to the a Null-terminated ASCII string containing the list
- of languages that an HII handle in the HII Database supports. The returned
+ Retrieves a pointer to the a Null-terminated ASCII string containing the list
+ of languages that an HII handle in the HII Database supports. The returned
string is allocated using AllocatePool(). The caller is responsible for freeing
the returned string using FreePool(). The format of the returned string follows
the language format assumed the HII Database.
-
+
If HiiHandle is NULL, then ASSERT().
@param[in] HiiHandle A handle that was previously registered in the HII Database.
@@ -1295,8 +1295,8 @@ GetSupportedLanguages ( Status = mPrivate.HiiString.GetLanguages (&mPrivate.HiiString, HiiHandle, &TempSupportedLanguages, &LanguageSize);
//
- // If GetLanguages() returns EFI_SUCCESS for a zero size,
- // then there are no supported languages registered for HiiHandle. If GetLanguages()
+ // If GetLanguages() returns EFI_SUCCESS for a zero size,
+ // then there are no supported languages registered for HiiHandle. If GetLanguages()
// returns an error other than EFI_BUFFER_TOO_SMALL, then HiiHandle is not present
// in the HII Database
//
@@ -1338,12 +1338,12 @@ GetSupportedLanguages ( /**
Retrieves a string from a string package.
-
+
If HiiHandle is NULL, then ASSERT().
If StringId is 0, then ASSET.
@param[in] HiiHandle A handle that was previously registered in the HII Database.
- @param[in] StringId The identifier of the string to retrieved from the string
+ @param[in] StringId The identifier of the string to retrieved from the string
package associated with HiiHandle.
@retval NULL The string specified by StringId is not present in the string package.
@@ -1370,7 +1370,7 @@ InternalGetString ( //
// Initialize all allocated buffers to NULL
- //
+ //
SupportedLanguages = NULL;
PlatformLanguage = NULL;
BestLanguage = NULL;
@@ -1394,11 +1394,11 @@ InternalGetString ( // Get the best matching language from SupportedLanguages
//
BestLanguage = GetBestLanguage (
- SupportedLanguages,
+ SupportedLanguages,
FALSE, // RFC 4646 mode
- Language, // Highest priority
+ Language, // Highest priority
PlatformLanguage != NULL ? PlatformLanguage : "", // Next highest priority
- SupportedLanguages, // Lowest priority
+ SupportedLanguages, // Lowest priority
NULL
);
if (BestLanguage == NULL) {
@@ -1419,8 +1419,8 @@ InternalGetString ( NULL
);
//
- // If GetString() returns EFI_SUCCESS for a zero size,
- // then there are no supported languages registered for HiiHandle. If GetString()
+ // If GetString() returns EFI_SUCCESS for a zero size,
+ // then there are no supported languages registered for HiiHandle. If GetString()
// returns an error other than EFI_BUFFER_TOO_SMALL, then HiiHandle is not present
// in the HII Database
//
@@ -1479,12 +1479,12 @@ Error: /**
This function checks VarOffset and VarWidth is in the block range.
- @param RequestBlockArray The block array is to be checked.
+ @param RequestBlockArray The block array is to be checked.
@param VarOffset Offset of var to the structure
@param VarWidth Width of var.
@param IsNameValueType Whether this varstore is name/value varstore or not.
@param HiiHandle Hii handle for this hii package.
-
+
@retval TRUE This Var is in the block range.
@retval FALSE This Var is not in the block range.
**/
@@ -1562,18 +1562,18 @@ GetFormPackageData ( // 0. Get Hii Form Package by HiiHandle
//
Status = ExportFormPackages (
- &mPrivate,
- DataBaseRecord->Handle,
- DataBaseRecord->PackageList,
- 0,
- Size,
+ &mPrivate,
+ DataBaseRecord->Handle,
+ DataBaseRecord->PackageList,
+ 0,
+ Size,
HiiFormPackage,
&ResultSize
);
if (EFI_ERROR (Status)) {
return Status;
}
-
+
(*HiiFormPackage) = AllocatePool (ResultSize);
if (*HiiFormPackage == NULL) {
Status = EFI_OUT_OF_RESOURCES;
@@ -1586,18 +1586,18 @@ GetFormPackageData ( Size = ResultSize;
ResultSize = 0;
Status = ExportFormPackages (
- &mPrivate,
- DataBaseRecord->Handle,
- DataBaseRecord->PackageList,
+ &mPrivate,
+ DataBaseRecord->Handle,
+ DataBaseRecord->PackageList,
0,
- Size,
+ Size,
*HiiFormPackage,
&ResultSize
);
if (EFI_ERROR (Status)) {
FreePool (*HiiFormPackage);
}
-
+
*PackageSize = Size;
return Status;
@@ -1612,7 +1612,7 @@ GetFormPackageData ( the first found varstore will be as ConfigHdr.
@param IsEfiVarstore Whether the request storage type is efi varstore type.
@param EfiVarStore The efi varstore info which will return.
-**/
+**/
EFI_STATUS
GetVarStoreType (
IN HII_DATABASE_RECORD *DataBaseRecord,
@@ -1630,12 +1630,12 @@ GetVarStoreType ( EFI_STRING GuidStr;
EFI_STRING NameStr;
EFI_STRING TempStr;
- UINTN LengthString;
+ UINTN LengthString;
UINT8 *HiiFormPackage;
UINTN PackageSize;
EFI_IFR_VARSTORE_EFI *IfrEfiVarStore;
EFI_HII_PACKAGE_HEADER *PackageHeader;
-
+
HiiFormPackage = NULL;
LengthString = 0;
Status = EFI_SUCCESS;
@@ -1673,8 +1673,8 @@ GetVarStoreType ( if (IfrOpHdr->OpCode == EFI_IFR_VARSTORE_EFI_OP ) {
IfrEfiVarStore = (EFI_IFR_VARSTORE_EFI *) IfrOpHdr;
//
- // If the length is small than the structure, this is from old efi
- // varstore definition. Old efi varstore get config directly from
+ // If the length is small than the structure, this is from old efi
+ // varstore definition. Old efi varstore get config directly from
// GetVariable function.
//
if (IfrOpHdr->Length < sizeof (EFI_IFR_VARSTORE_EFI)) {
@@ -1715,8 +1715,8 @@ GetVarStoreType ( }
*IsEfiVarstore = TRUE;
CopyMem (*EfiVarStore, IfrEfiVarStore, IfrOpHdr->Length);
- }
-
+ }
+
//
// Free allocated temp string.
//
@@ -1778,7 +1778,7 @@ GetElementsFromRequest ( @retval TRUE This varstore is the request one.
@retval FALSE This varstore is not the request one.
-
+
**/
BOOLEAN
IsThisVarstore (
@@ -1826,7 +1826,7 @@ IsThisVarstore ( Done:
if (GuidStr != NULL) {
- FreePool (GuidStr);
+ FreePool (GuidStr);
}
if (NameStr != NULL) {
@@ -1848,7 +1848,7 @@ Done: the first found varstore will be as ConfigHdr.
@retval TRUE This hii package is the request one.
@retval FALSE This hii package is not the request one.
-**/
+**/
BOOLEAN
IsThisPackageList (
IN HII_DATABASE_RECORD *DataBaseRecord,
@@ -1901,7 +1901,7 @@ IsThisPackageList ( PackageOffset += IfrOpHdr->Length;
switch (IfrOpHdr->OpCode) {
-
+
case EFI_IFR_VARSTORE_OP:
IfrVarStore = (EFI_IFR_VARSTORE *) IfrOpHdr;
@@ -1947,7 +1947,7 @@ IsThisPackageList ( goto Done;
}
break;
-
+
case EFI_IFR_FORM_OP:
case EFI_IFR_FORM_MAP_OP:
//
@@ -1985,7 +1985,7 @@ Done: @retval EFI_SUCCESS This opcode is required.
@retval EFI_NOT_FOUND This opcode is not required.
@retval Others Contain some error.
-
+
**/
EFI_STATUS
IsThisOpcodeRequired (
@@ -2042,7 +2042,7 @@ IsThisOpcodeRequired ( BitWidth = VarWidth;
BitOffset = VarOffset * 8;
}
-
+
//
// Check whether this question is in requested block array.
//
@@ -2054,7 +2054,7 @@ IsThisOpcodeRequired ( }
//
- // Check this var question is in the var storage
+ // Check this var question is in the var storage
//
if (((VarOffset + VarWidth) > VarStorageData->Size)) {
return EFI_INVALID_PARAMETER;
@@ -2104,7 +2104,7 @@ IsThisOpcodeRequired ( @retval EFI_SUCCESS The block array and the default value array are got.
@retval EFI_INVALID_PARAMETER The varstore definition in the different form packages
- are conflicted.
+ are conflicted.
@retval EFI_OUT_OF_RESOURCES No enough memory.
**/
EFI_STATUS
@@ -2239,10 +2239,10 @@ ParseIfrData ( IfrEfiVarStore = (EFI_IFR_VARSTORE_EFI *) IfrOpHdr;
//
- // If the length is small than the structure, this is from old efi
- // varstore definition. Old efi varstore get config directly from
+ // If the length is small than the structure, this is from old efi
+ // varstore definition. Old efi varstore get config directly from
// GetVariable function.
- //
+ //
if (IfrOpHdr->Length < sizeof (EFI_IFR_VARSTORE_EFI)) {
break;
}
@@ -2317,7 +2317,7 @@ ParseIfrData ( case EFI_IFR_REF_OP:
//
- // Ref question is not in IFR Form. This IFR form is not valid.
+ // Ref question is not in IFR Form. This IFR form is not valid.
//
if ( VarStoreId == 0) {
Status = EFI_INVALID_PARAMETER;
@@ -2358,7 +2358,7 @@ ParseIfrData ( //
//
- // Numeric and OneOf question is not in IFR Form. This IFR form is not valid.
+ // Numeric and OneOf question is not in IFR Form. This IFR form is not valid.
//
if (VarStoreId == 0) {
Status = EFI_INVALID_PARAMETER;
@@ -2408,7 +2408,7 @@ ParseIfrData ( FirstOneOfOption = TRUE;
} else if (IfrOpHdr->OpCode == EFI_IFR_NUMERIC_OP) {
//
- // Numeric minimum value will be used as default value when no default is specified.
+ // Numeric minimum value will be used as default value when no default is specified.
//
DefaultData.Type = DefaultValueFromDefault;
if (QuestionReferBitField) {
@@ -2441,7 +2441,7 @@ ParseIfrData ( }
//
// Set default value base on the DefaultId list get from IFR data.
- //
+ //
for (LinkData = DefaultIdArray->Entry.ForwardLink; LinkData != &DefaultIdArray->Entry; LinkData = LinkData->ForwardLink) {
DefaultDataPtr = BASE_CR (LinkData, IFR_DEFAULT_DATA, Entry);
DefaultData.DefaultId = DefaultDataPtr->DefaultId;
@@ -2458,7 +2458,7 @@ ParseIfrData ( FirstOrderedList = TRUE;
//
- // OrderedList question is not in IFR Form. This IFR form is not valid.
+ // OrderedList question is not in IFR Form. This IFR form is not valid.
//
if (VarStoreId == 0) {
Status = EFI_INVALID_PARAMETER;
@@ -2501,10 +2501,10 @@ ParseIfrData ( // default id by CheckBox Flags if CheckBox flags (Default or Mau) is set, the default value is 1 to be set.
// value by DefaultOption
// default id by DeaultOption DefaultId can override CheckBox Flags and Default value.
- //
+ //
//
- // CheckBox question is not in IFR Form. This IFR form is not valid.
+ // CheckBox question is not in IFR Form. This IFR form is not valid.
//
if (VarStoreId == 0) {
Status = EFI_INVALID_PARAMETER;
@@ -2651,7 +2651,7 @@ ParseIfrData ( //
//
- // Date question is not in IFR Form. This IFR form is not valid.
+ // Date question is not in IFR Form. This IFR form is not valid.
//
if (VarStoreId == 0) {
Status = EFI_INVALID_PARAMETER;
@@ -2693,7 +2693,7 @@ ParseIfrData ( //
//
- // Time question is not in IFR Form. This IFR form is not valid.
+ // Time question is not in IFR Form. This IFR form is not valid.
//
if (VarStoreId == 0) {
Status = EFI_INVALID_PARAMETER;
@@ -2735,7 +2735,7 @@ ParseIfrData ( //
//
- // String question is not in IFR Form. This IFR form is not valid.
+ // String question is not in IFR Form. This IFR form is not valid.
//
if (VarStoreId == 0) {
Status = EFI_INVALID_PARAMETER;
@@ -2777,7 +2777,7 @@ ParseIfrData ( //
//
- // Password question is not in IFR Form. This IFR form is not valid.
+ // Password question is not in IFR Form. This IFR form is not valid.
//
if (VarStoreId == 0) {
Status = EFI_INVALID_PARAMETER;
@@ -2872,7 +2872,7 @@ ParseIfrData ( break;
}
//
- // Check this var question is in the var storage
+ // Check this var question is in the var storage
//
if ((BlockData->Name == NULL) && ((BlockData->Offset + BlockData->Width) > VarStorageData->Size)) {
Status = EFI_INVALID_PARAMETER;
@@ -2899,13 +2899,13 @@ ParseIfrData ( if (((IfrOneOfOption->Flags & EFI_IFR_OPTION_DEFAULT) == EFI_IFR_OPTION_DEFAULT) ||
((IfrOneOfOption->Flags & EFI_IFR_OPTION_DEFAULT_MFG) == EFI_IFR_OPTION_DEFAULT_MFG)) {
//
- // This flag is used to specify whether this option is the first. Set it to FALSE for the following options.
- // The first oneof option value will be used as default value when no default value is specified.
+ // This flag is used to specify whether this option is the first. Set it to FALSE for the following options.
+ // The first oneof option value will be used as default value when no default value is specified.
//
FirstOneOfOption = FALSE;
SmallestIdFromFlag = FALSE;
-
+
// Prepare new DefaultValue
//
DefaultData.Type = DefaultValueFromFlag;
@@ -2951,19 +2951,19 @@ ParseIfrData ( //
// 2. Set as the default value when this is the first option.
- // The first oneof option value will be used as default value when no default value is specified.
+ // The first oneof option value will be used as default value when no default value is specified.
//
if (FirstOneOfOption) {
- // This flag is used to specify whether this option is the first. Set it to FALSE for the following options.
+ // This flag is used to specify whether this option is the first. Set it to FALSE for the following options.
FirstOneOfOption = FALSE;
-
+
//
// Prepare new DefaultValue
- //
+ //
DefaultData.Type = DefaultValueFromDefault;
CopyMem (&DefaultData.Value, &IfrOneOfOption->Value, IfrOneOfOption->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
for (LinkData = DefaultIdArray->Entry.ForwardLink; LinkData != &DefaultIdArray->Entry; LinkData = LinkData->ForwardLink) {
- DefaultDataPtr = BASE_CR (LinkData, IFR_DEFAULT_DATA, Entry);
+ DefaultDataPtr = BASE_CR (LinkData, IFR_DEFAULT_DATA, Entry);
DefaultData.DefaultId = DefaultDataPtr->DefaultId;
InsertDefaultValue (BlockData, &DefaultData);
}
@@ -3194,7 +3194,7 @@ GetBlockElement ( if (*StringPtr != 0 && *StringPtr != L'&') {
goto Done;
}
-
+
//
// Set Block Data
//
@@ -3226,7 +3226,7 @@ GetBlockElement ( }
}
//
- // If '\0', parsing is finished.
+ // If '\0', parsing is finished.
//
if (*StringPtr == 0) {
break;
@@ -3343,7 +3343,7 @@ GetNameElement ( if (HasValue) {
//
// If has value, skip the value.
- //
+ //
StringPtr = NextTag + 1;
*NextTag = L'=';
StringPtr = StrStr (StringPtr, L"&");
@@ -3408,14 +3408,14 @@ GenerateConfigRequest ( // Append VarStorageData BlockEntry into *Request string
// Now support only one varstore in a form package.
//
-
+
//
// Go through all VarStorageData Entry and get BlockEntry for each one for the multiple varstore in a single form package
// Then construct them all to return MultiRequest string : ConfigHdr BlockConfig
//
-
+
//
- // Compute the length of the entire request starting with <ConfigHdr> and a
+ // Compute the length of the entire request starting with <ConfigHdr> and a
// Null-terminator
//
DataExist = FALSE;
@@ -3428,7 +3428,7 @@ GenerateConfigRequest ( //
// Add <BlockName> length for each Name
//
- // <BlockName> ::= &Name1&Name2&...
+ // <BlockName> ::= &Name1&Name2&...
// |1| StrLen(Name1)
//
Length = Length + (1 + StrLen (BlockData->Name));
@@ -3486,10 +3486,10 @@ GenerateConfigRequest ( // Append &OFFSET=XXXX&WIDTH=YYYY\0
//
UnicodeSPrint (
- StringPtr,
- (8 + 4 + 7 + 4 + 1) * sizeof (CHAR16),
- L"&OFFSET=%04X&WIDTH=%04X",
- BlockData->Offset,
+ StringPtr,
+ (8 + 4 + 7 + 4 + 1) * sizeof (CHAR16),
+ L"&OFFSET=%04X&WIDTH=%04X",
+ BlockData->Offset,
BlockData->Width
);
}
@@ -3897,7 +3897,7 @@ GenerateAltConfigResp ( // |1| StrLen (ConfigHdr) | 8 | 4 |
//
Length += (1 + StrLen (ConfigHdr) + 8 + 4);
-
+
for (LinkData = VarStorageData->BlockEntry.ForwardLink; LinkData != &VarStorageData->BlockEntry; LinkData = LinkData->ForwardLink) {
BlockData = BASE_CR (LinkData, IFR_BLOCK_DATA, Entry);
ListEntry = &BlockData->DefaultValueEntry;
@@ -3923,7 +3923,7 @@ GenerateAltConfigResp ( }
}
}
-
+
//
// No default value is found. The default string doesn't exist.
//
@@ -3953,10 +3953,10 @@ GenerateAltConfigResp ( // |1| StrLen (ConfigHdr) | 8 | 4 |
//
UnicodeSPrint (
- StringPtr,
- (1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16),
- L"&%s&ALTCFG=%04X",
- ConfigHdr,
+ StringPtr,
+ (1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16),
+ L"&%s&ALTCFG=%04X",
+ ConfigHdr,
DefaultId->DefaultId
);
StringPtr += StrLen (StringPtr);
@@ -3971,9 +3971,9 @@ GenerateAltConfigResp ( }
if (VarStorageData->Type == EFI_HII_VARSTORE_NAME_VALUE) {
UnicodeSPrint (
- StringPtr,
- (1 + StrLen (ConfigHdr) + 1) * sizeof (CHAR16),
- L"&%s=",
+ StringPtr,
+ (1 + StrLen (ConfigHdr) + 1) * sizeof (CHAR16),
+ L"&%s=",
BlockData->Name
);
StringPtr += StrLen (StringPtr);
@@ -3983,10 +3983,10 @@ GenerateAltConfigResp ( // <BlockConfig> ::= 'OFFSET='<Number>&'WIDTH='<Number>&'VALUE'=<Number>
//
UnicodeSPrint (
- StringPtr,
+ StringPtr,
(8 + 4 + 7 + 4 + 7 + 1) * sizeof (CHAR16),
- L"&OFFSET=%04X&WIDTH=%04X&VALUE=",
- BlockData->Offset,
+ L"&OFFSET=%04X&WIDTH=%04X&VALUE=",
+ BlockData->Offset,
BlockData->Width
);
StringPtr += StrLen (StringPtr);
@@ -4038,32 +4038,32 @@ GenerateAltConfigResp ( }
/**
- This function gets the full request string and full default value string by
- parsing IFR data in HII form packages.
-
- When Request points to NULL string, the request string and default value string
- for each varstore in form package will return.
+ This function gets the full request string and full default value string by
+ parsing IFR data in HII form packages.
+
+ When Request points to NULL string, the request string and default value string
+ for each varstore in form package will return.
@param DataBaseRecord The DataBaseRecord instance contains the found Hii handle and package.
@param DevicePath Device Path which Hii Config Access Protocol is registered.
@param Request Pointer to a null-terminated Unicode string in
<ConfigRequest> format. When it doesn't contain
- any RequestElement, it will be updated to return
+ any RequestElement, it will be updated to return
the full RequestElement retrieved from IFR data.
If it points to NULL, the request string for the first
varstore in form package will be merged into a
- <MultiConfigRequest> format string and return.
+ <MultiConfigRequest> format string and return.
@param AltCfgResp Pointer to a null-terminated Unicode string in
<ConfigAltResp> format. When the pointer is to NULL,
the full default value string retrieved from IFR data
will return. When the pinter is to a string, the
full default value string retrieved from IFR data
will be merged into the input string and return.
- When Request points to NULL, the default value string
- for each varstore in form package will be merged into
+ When Request points to NULL, the default value string
+ for each varstore in form package will be merged into
a <MultiConfigAltResp> format string and return.
@param PointerProgress Optional parameter, it can be NULL.
- When it is not NULL, if Request is NULL, it returns NULL.
+ When it is not NULL, if Request is NULL, it returns NULL.
On return, points to a character in the Request
string. Points to the string's null terminator if
request was successful. Points to the most recent
@@ -4074,7 +4074,7 @@ GenerateAltConfigResp ( @retval EFI_SUCCESS The Results string is set to the full request string.
And AltCfgResp contains all default value string.
@retval EFI_OUT_OF_RESOURCES Not enough memory for the return string.
- @retval EFI_NOT_FOUND The varstore (Guid and Name) in Request string
+ @retval EFI_NOT_FOUND The varstore (Guid and Name) in Request string
can't be found in Form package.
@retval EFI_NOT_FOUND HiiPackage can't be got on the input HiiHandle.
@retval EFI_INVALID_PARAMETER Request points to NULL.
@@ -4321,7 +4321,7 @@ Done: }
//
- // Free the allocated string
+ // Free the allocated string
//
if (ConfigHdr != NULL) {
FreePool (ConfigHdr);
@@ -4348,13 +4348,13 @@ Done: }
/**
- This function gets the full request resp string by
+ This function gets the full request resp string by
parsing IFR data in HII form packages.
@param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
instance.
- @param EfiVarStoreInfo The efi varstore info which is save in the EFI
- varstore data structure.
+ @param EfiVarStoreInfo The efi varstore info which is save in the EFI
+ varstore data structure.
@param Request Pointer to a null-terminated Unicode string in
<ConfigRequest> format.
@param RequestResp Pointer to a null-terminated Unicode string in
@@ -4376,7 +4376,7 @@ Done: EFI_STATUS
GetConfigRespFromEfiVarStore (
IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
- IN EFI_IFR_VARSTORE_EFI *EfiVarStoreInfo,
+ IN EFI_IFR_VARSTORE_EFI *EfiVarStoreInfo,
IN EFI_STRING Request,
OUT EFI_STRING *RequestResp,
OUT EFI_STRING *AccessProgress
@@ -4401,8 +4401,8 @@ GetConfigRespFromEfiVarStore ( goto Done;
}
AsciiStrToUnicodeStrS ((CHAR8 *) EfiVarStoreInfo->Name, VarStoreName, NameSize);
-
-
+
+
Status = gRT->GetVariable (VarStoreName, &EfiVarStoreInfo->Guid, NULL, &BufferSize, NULL);
if (Status != EFI_BUFFER_TOO_SMALL) {
goto Done;
@@ -4434,17 +4434,17 @@ Done: /**
- This function route the full request resp string for efi varstore.
+ This function route the full request resp string for efi varstore.
@param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
instance.
- @param EfiVarStoreInfo The efi varstore info which is save in the EFI
- varstore data structure.
+ @param EfiVarStoreInfo The efi varstore info which is save in the EFI
+ varstore data structure.
@param RequestResp Pointer to a null-terminated Unicode string in
<ConfigResp> format.
@param Result Pointer to a null-terminated Unicode string in
<ConfigResp> format.
-
+
@retval EFI_SUCCESS The Results string is set to the full request string.
And AltCfgResp contains all default value string.
@retval EFI_OUT_OF_RESOURCES Not enough memory for the return string.
@@ -4454,7 +4454,7 @@ Done: EFI_STATUS
RouteConfigRespForEfiVarStore (
IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
- IN EFI_IFR_VARSTORE_EFI *EfiVarStoreInfo,
+ IN EFI_IFR_VARSTORE_EFI *EfiVarStoreInfo,
IN EFI_STRING RequestResp,
OUT EFI_STRING *Result
)
@@ -4479,7 +4479,7 @@ RouteConfigRespForEfiVarStore ( goto Done;
}
AsciiStrToUnicodeStrS ((CHAR8 *) EfiVarStoreInfo->Name, VarStoreName, NameSize);
-
+
Status = gRT->GetVariable (VarStoreName, &EfiVarStoreInfo->Guid, NULL, &BufferSize, NULL);
if (Status != EFI_BUFFER_TOO_SMALL) {
DEBUG ((DEBUG_ERROR, "The variable does not exist!"));
@@ -4520,7 +4520,7 @@ Done: /**
Validate the config request elements.
- @param ConfigElements A null-terminated Unicode string in <ConfigRequest> format,
+ @param ConfigElements A null-terminated Unicode string in <ConfigRequest> format,
without configHdr field.
@retval CHAR16 * THE first Name/value pair not correct.
@@ -4563,7 +4563,7 @@ OffsetWidthValidate ( /**
Validate the config request elements.
- @param ConfigElements A null-terminated Unicode string in <ConfigRequest> format,
+ @param ConfigElements A null-terminated Unicode string in <ConfigRequest> format,
without configHdr field.
@retval CHAR16 * THE first Name/value pair not correct.
@@ -4588,7 +4588,7 @@ NameValueValidate ( StringPtr += 1;
StringPtr = StrStr (StringPtr, L"&");
-
+
if (StringPtr == NULL) {
return NULL;
}
@@ -4696,7 +4696,7 @@ ConfigRequestValidate ( @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
before the error or the beginning of the string.
@retval EFI_INVALID_PARAMETER The ExtractConfig function of the underlying HII
- Configuration Access Protocol returned
+ Configuration Access Protocol returned
EFI_INVALID_PARAMETER. Progress set to most recent
& before the error or the beginning of the string.
@@ -4833,7 +4833,7 @@ HiiConfigRoutingExtractConfig ( }
}
}
-
+
//
// Try to find driver handle by device path.
//
@@ -4871,7 +4871,7 @@ HiiConfigRoutingExtractConfig ( IfrDataParsedFlag = FALSE;
if ((HiiHandle != NULL) && !GetElementsFromRequest(ConfigRequest)) {
//
- // Get the full request string from IFR when HiiPackage is registered to HiiHandle
+ // Get the full request string from IFR when HiiPackage is registered to HiiHandle
//
IfrDataParsedFlag = TRUE;
Status = GetFullStringFromHiiFormPackages (Database, DevicePath, &ConfigRequest, &DefaultResults, &AccessProgress);
@@ -4900,7 +4900,7 @@ HiiConfigRoutingExtractConfig ( if (EFI_ERROR (Status)) {
goto Done;
}
-
+
if (IsEfiVarStore) {
//
// Call the GetVariable function to extract settings.
@@ -4999,7 +4999,7 @@ HiiConfigRoutingExtractConfig ( ASSERT (*AccessProgress == 0);
//
- // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle
+ // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle
//
if (!IfrDataParsedFlag && HiiHandle != NULL) {
Status = GetFullStringFromHiiFormPackages (Database, DevicePath, &ConfigRequest, &DefaultResults, NULL);
@@ -5015,13 +5015,13 @@ HiiConfigRoutingExtractConfig ( FreePool (DefaultResults);
DefaultResults = NULL;
}
-
+
NextConfigString:
if (!FirstElement) {
Status = AppendToMultiString (Results, L"&");
ASSERT_EFI_ERROR (Status);
}
-
+
Status = AppendToMultiString (Results, AccessResults);
ASSERT_EFI_ERROR (Status);
@@ -5049,22 +5049,22 @@ Done: FreePool (*Results);
*Results = NULL;
}
-
+
if (ConfigRequest != NULL) {
FreePool (ConfigRequest);
}
-
+
if (AccessResults != NULL) {
FreePool (AccessResults);
}
-
+
if (DefaultResults != NULL) {
FreePool (DefaultResults);
}
-
+
if (DevicePath != NULL) {
FreePool (DevicePath);
- }
+ }
return Status;
}
@@ -5079,8 +5079,8 @@ Done: instance.
@param Results Null-terminated Unicode string in
<MultiConfigAltResp> format which has all values
- filled in for the entirety of the current HII
- database. String to be allocated by the called
+ filled in for the entirety of the current HII
+ database. String to be allocated by the called
function. De-allocation is up to the caller.
@retval EFI_SUCCESS The Results string is filled with the values
@@ -5196,7 +5196,7 @@ HiiConfigRoutingExportConfig ( );
if (EFI_ERROR (Status)) {
//
- // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle
+ // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle
//
if (HiiHandle != NULL && DevicePath != NULL) {
IfrDataParsedFlag = TRUE;
@@ -5220,7 +5220,7 @@ HiiConfigRoutingExportConfig ( if (!EFI_ERROR (Status)) {
//
- // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle
+ // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle
//
if (!IfrDataParsedFlag && HiiHandle != NULL && DevicePath != NULL) {
StringPtr = StrStr (AccessResults, L"&GUID=");
@@ -5244,7 +5244,7 @@ HiiConfigRoutingExportConfig ( FreePool (DefaultResults);
DefaultResults = NULL;
}
-
+
//
// Attach this <ConfigAltResp> to a <MultiConfigAltResp>. There is a '&'
// which separates the first <ConfigAltResp> and the following ones.
@@ -5253,19 +5253,19 @@ HiiConfigRoutingExportConfig ( Status = AppendToMultiString (Results, L"&");
ASSERT_EFI_ERROR (Status);
}
-
+
Status = AppendToMultiString (Results, AccessResults);
ASSERT_EFI_ERROR (Status);
FirstElement = FALSE;
-
+
FreePool (AccessResults);
AccessResults = NULL;
}
}
FreePool (ConfigAccessHandles);
- return EFI_SUCCESS;
+ return EFI_SUCCESS;
}
@@ -5433,7 +5433,7 @@ HiiConfigRoutingRouteConfig ( if (IsEfiVarstore) {
//
// Call the SetVariable function to route settings.
- //
+ //
Status = RouteConfigRespForEfiVarStore(This, EfiVarStoreInfo, ConfigResp, &AccessProgress);
FreePool (EfiVarStoreInfo);
} else {
@@ -5705,7 +5705,7 @@ HiiBlockToConfig ( Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
-
+
TemString = ValueStr;
TemBuffer = Value + Width - 1;
for (Index = 0; Index < Width; Index ++, TemBuffer --) {
@@ -5762,7 +5762,7 @@ HiiBlockToConfig ( Status = EFI_INVALID_PARAMETER;
goto Exit;
}
-
+
HiiToLower (*Config);
*Progress = StringPtr;
return EFI_SUCCESS;
@@ -5827,7 +5827,7 @@ Exit: value pair. Block is left updated and
Progress points at the '&' preceding the first
non-<BlockName>.
- @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
+ @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
BlockSize is updated with the required buffer size.
@retval EFI_NOT_FOUND Target for the specified routing data was not found.
Progress points to the "G" in "GUID" of the errant
@@ -5993,7 +5993,7 @@ HiiConfigToBlock ( break;
}
}
-
+
//
// The input string is not ConfigResp format, return error.
//
@@ -6128,10 +6128,10 @@ HiiGetAltCfg ( &PathStr
);
if (AltCfgId != NULL) {
- GenerateSubStr (L"ALTCFG=", sizeof (UINT16), (VOID *) AltCfgId, 3, &AltIdStr);
+ GenerateSubStr (L"ALTCFG=", sizeof (UINT16), (VOID *) AltCfgId, 3, &AltIdStr);
}
if (Name != NULL) {
- GenerateSubStr (L"NAME=", StrLen (Name) * sizeof (CHAR16), (VOID *) Name, 2, &NameStr);
+ GenerateSubStr (L"NAME=", StrLen (Name) * sizeof (CHAR16), (VOID *) Name, 2, &NameStr);
} else {
GenerateSubStr (L"NAME=", 0, NULL, 2, &NameStr);
}
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c index e8f4564..45448c5 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c @@ -1,7 +1,7 @@ /** @file
Implementation for EFI_HII_DATABASE_PROTOCOL.
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1431,7 +1431,7 @@ Error: /**
Adjust all string packages in a single package list to have the same max string ID.
-
+
@param PackageList Pointer to a package list which will be adjusted.
@retval EFI_SUCCESS Adjust all string packages successfully.
@@ -3154,7 +3154,7 @@ AddPackages ( PackageHdrPtr = (EFI_HII_PACKAGE_HEADER *) ((UINT8 *) PackageHdrPtr + PackageHeader.Length);
CopyMem (&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER));
}
-
+
//
// Adjust String Package to make sure all string packages have the same max string ID.
//
@@ -3520,7 +3520,7 @@ HiiNewPackageList ( DatabaseRecord = CR (Link, HII_DATABASE_RECORD, DatabaseEntry, HII_DATABASE_RECORD_SIGNATURE);
if (CompareGuid (
&(DatabaseRecord->PackageList->PackageListHdr.PackageListGuid),
- &PackageListGuid) &&
+ &PackageListGuid) &&
DatabaseRecord->DriverHandle == DriverHandle) {
return EFI_INVALID_PARAMETER;
}
@@ -3992,7 +3992,7 @@ HiiListPackageLists ( @retval EFI_NOT_FOUND The specified Handle could not be found in the
current database.
@retval EFI_INVALID_PARAMETER BufferSize was NULL.
- @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
+ @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
and Buffer was NULL.
**/
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c index b85cf88..4840933 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c @@ -2,7 +2,7 @@ Implementation for EFI_HII_FONT_PROTOCOL.
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -304,14 +304,14 @@ NarrowGlyphToBlt ( Height = EFI_GLYPH_HEIGHT;
Width = EFI_GLYPH_WIDTH;
-
+
//
// Move position to the left-top corner of char.
//
Buffer = *Origin - EFI_GLYPH_HEIGHT * ImageWidth;
//
- // Char may be partially displayed when CLIP_X or CLIP_Y is not set.
+ // Char may be partially displayed when CLIP_X or CLIP_Y is not set.
//
if (RowHeight < Height) {
Height = (UINT8) RowHeight;
@@ -685,7 +685,7 @@ FindGlyphBlock ( ASSERT (FontPackage->Signature == HII_FONT_PACKAGE_SIGNATURE);
BaseLine = 0;
MinOffsetY = 0;
-
+
if (CharValue == (CHAR16) (-1)) {
//
// Collect the cell information specified in font package fixed header.
@@ -1099,8 +1099,8 @@ IsSystemFontInfo ( }
if ((StringInfo->FontInfoMask & EFI_FONT_INFO_SYS_FORE_COLOR) == 0) {
if (CompareMem (
- &StringInfo->ForegroundColor,
- &SystemDefault->ForegroundColor,
+ &StringInfo->ForegroundColor,
+ &SystemDefault->ForegroundColor,
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
) != 0) {
goto Exit;
@@ -1108,8 +1108,8 @@ IsSystemFontInfo ( }
if ((StringInfo->FontInfoMask & EFI_FONT_INFO_SYS_BACK_COLOR) == 0) {
if (CompareMem (
- &StringInfo->BackgroundColor,
- &SystemDefault->BackgroundColor,
+ &StringInfo->BackgroundColor,
+ &SystemDefault->BackgroundColor,
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
) != 0) {
goto Exit;
@@ -1745,7 +1745,7 @@ HiiStringToImage ( goto Exit;
}
}
-
+
//
// Use the maximum height of font as the base line.
// And, use the maximum height as line height.
@@ -1753,7 +1753,7 @@ HiiStringToImage ( LineHeight = Height;
LastLineHeight = Height;
BaseLineOffset = Height - BaseLine;
-
+
//
// Parse the string to be displayed to drop some ignored characters.
//
@@ -1799,7 +1799,7 @@ HiiStringToImage ( Index++;
continue;
}
-
+
Status = GetGlyphBuffer (Private, *StringPtr, FontInfo, &GlyphBuf[Index], &Cell[Index], &Attributes[Index]);
if (Status == EFI_NOT_FOUND) {
if ((Flags & EFI_HII_IGNORE_IF_NO_GLYPH) == EFI_HII_IGNORE_IF_NO_GLYPH) {
@@ -1971,8 +1971,8 @@ HiiStringToImage ( // opportunity prior to a character whose right-most extent would exceed Width.
// Search the right-most line-break opportunity here.
//
- if ((Flags & EFI_HII_OUT_FLAG_WRAP) == EFI_HII_OUT_FLAG_WRAP &&
- (RowInfo[RowIndex].LineWidth + BltX > Image->Width || StringPtr[NextIndex] != 0) &&
+ if ((Flags & EFI_HII_OUT_FLAG_WRAP) == EFI_HII_OUT_FLAG_WRAP &&
+ (RowInfo[RowIndex].LineWidth + BltX > Image->Width || StringPtr[NextIndex] != 0) &&
!LineBreak) {
if ((Flags & EFI_HII_IGNORE_LINE_BREAK) == 0) {
LineWidth = RowInfo[RowIndex].LineWidth;
@@ -2040,7 +2040,7 @@ HiiStringToImage ( }
}
}
-
+
//
// LineWidth can't exceed Image width.
//
@@ -2091,7 +2091,7 @@ HiiStringToImage ( );
}
if (ColumnInfoArray != NULL) {
- if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0)
+ if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0)
|| RowInfo[RowIndex].LineWidth == 0) {
*ColumnInfoArray = (UINTN) ~0;
} else {
@@ -2119,7 +2119,7 @@ HiiStringToImage ( FreePool (BltBuffer);
goto Exit;
}
-
+
FreePool (BltBuffer);
}
} else {
@@ -2151,7 +2151,7 @@ HiiStringToImage ( );
}
if (ColumnInfoArray != NULL) {
- if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0)
+ if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0)
|| RowInfo[RowIndex].LineWidth == 0) {
*ColumnInfoArray = (UINTN) ~0;
} else {
@@ -2392,7 +2392,7 @@ HiiStringIdToImage ( if (EFI_ERROR (Status)) {
goto Exit;
}
-
+
if (Language == NULL) {
Language = "";
}
@@ -2409,7 +2409,7 @@ HiiStringIdToImage ( Status = EFI_NOT_FOUND;
goto Exit;
}
-
+
StringSize = MAX_STRING_LENGTH;
String = (EFI_STRING) AllocateZeroPool (StringSize);
if (String == NULL) {
@@ -2447,33 +2447,33 @@ HiiStringIdToImage ( if (EFI_ERROR (Status)) {
goto Exit;
}
-
+
//
// When StringInfo specifies that string will be output in the system default font and color,
- // use particular stringfontinfo described in string package instead if exists.
+ // use particular stringfontinfo described in string package instead if exists.
// StringFontInfo equals NULL means system default font attaches with the string block.
//
if (StringFontInfo != NULL && IsSystemFontInfo (Private, (EFI_FONT_DISPLAY_INFO *) StringInfo, NULL, NULL)) {
NameSize = StrSize (StringFontInfo->FontName);
FontLen = sizeof (EFI_FONT_DISPLAY_INFO) - sizeof (CHAR16) + NameSize;
NewStringInfo = AllocateZeroPool (FontLen);
- if (NewStringInfo == NULL) {
+ if (NewStringInfo == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Exit;
}
NewStringInfo->FontInfoMask = EFI_FONT_INFO_SYS_FORE_COLOR | EFI_FONT_INFO_SYS_BACK_COLOR;
NewStringInfo->FontInfo.FontStyle = StringFontInfo->FontStyle;
- NewStringInfo->FontInfo.FontSize = StringFontInfo->FontSize;
+ NewStringInfo->FontInfo.FontSize = StringFontInfo->FontSize;
StrCpyS (NewStringInfo->FontInfo.FontName, NameSize / sizeof (CHAR16), StringFontInfo->FontName);
-
+
Status = HiiStringToImage (
- This,
- Flags,
- String,
- NewStringInfo,
- Blt,
- BltX,
- BltY,
+ This,
+ Flags,
+ String,
+ NewStringInfo,
+ Blt,
+ BltX,
+ BltY,
RowInfoArray,
RowInfoArraySize,
ColumnInfoArray
@@ -2640,7 +2640,7 @@ HiiGetGlyph ( //
BaseLine = (UINT16) (Cell.Height + Cell.OffsetY);
//
- // Set BltBuffer to the position of Origin.
+ // Set BltBuffer to the position of Origin.
//
BltBuffer = Image->Image.Bitmap + (Cell.Height + Cell.OffsetY) * Image->Width - Cell.OffsetX;
GlyphToImage (
@@ -2715,7 +2715,7 @@ Exit: @param StringInfoOut Upon return, contains the matching font's information.
If NULL, then no information is returned. This buffer
is allocated with a call to the Boot Service AllocatePool().
- It is the caller's responsibility to call the Boot
+ It is the caller's responsibility to call the Boot
Service FreePool() when the caller no longer requires
the contents of StringInfoOut.
@param String Points to the string which will be tested to
@@ -2800,7 +2800,7 @@ HiiGetFontInfo ( goto Exit;
}
}
-
+
//
// StringInfoIn must not be NULL if it is not system default font info.
//
@@ -2808,15 +2808,15 @@ HiiGetFontInfo ( //
// Check the font information mask to make sure it is valid.
//
- if (((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) ==
+ if (((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) ==
(EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) ||
- ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) ==
+ ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) ==
(EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) ||
- ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) ==
+ ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) ==
(EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) ||
- ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ==
- (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ||
- ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE)) ==
+ ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ==
+ (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ||
+ ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE)) ==
(EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE))) {
return EFI_INVALID_PARAMETER;
}
@@ -2838,7 +2838,7 @@ HiiGetFontInfo ( if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_SIZE) == EFI_FONT_INFO_SYS_SIZE) {
InfoOut.FontInfo.FontSize = SystemDefault->FontInfo.FontSize;
- }
+ }
if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_STYLE) == EFI_FONT_INFO_SYS_STYLE) {
InfoOut.FontInfo.FontStyle = SystemDefault->FontInfo.FontStyle;
}
@@ -2848,7 +2848,7 @@ HiiGetFontInfo ( if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_BACK_COLOR) == EFI_FONT_INFO_SYS_BACK_COLOR) {
InfoOut.BackgroundColor = SystemDefault->BackgroundColor;
}
-
+
ASSERT (FontInfo != NULL);
FontInfo->FontSize = InfoOut.FontInfo.FontSize;
FontInfo->FontStyle = InfoOut.FontInfo.FontStyle;
@@ -2856,7 +2856,7 @@ HiiGetFontInfo ( if (IsFontInfoExisted (Private, FontInfo, &InfoOut.FontInfoMask, LocalFontHandle, &GlobalFont)) {
//
// Test to guarantee all characters are available in the found font.
- //
+ //
if (String != NULL) {
StringIn = String;
while (*StringIn != 0) {
@@ -2873,21 +2873,21 @@ HiiGetFontInfo ( //
if (StringInfoOut != NULL) {
StringInfoOutLen = sizeof (EFI_FONT_DISPLAY_INFO) - sizeof (EFI_FONT_INFO) + GlobalFont->FontInfoSize;
- *StringInfoOut = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (StringInfoOutLen);
+ *StringInfoOut = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (StringInfoOutLen);
if (*StringInfoOut == NULL) {
Status = EFI_OUT_OF_RESOURCES;
LocalFontHandle = NULL;
goto Exit;
}
-
+
CopyMem (*StringInfoOut, &InfoOut, sizeof (EFI_FONT_DISPLAY_INFO));
CopyMem (&(*StringInfoOut)->FontInfo, GlobalFont->FontInfo, GlobalFont->FontInfoSize);
}
-
- LocalFontHandle = GlobalFont->Entry.ForwardLink;
+
+ LocalFontHandle = GlobalFont->Entry.ForwardLink;
Status = EFI_SUCCESS;
goto Exit;
- }
+ }
Status = EFI_NOT_FOUND;
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h index 8336dd0..4391625 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h @@ -1,7 +1,7 @@ /** @file
Private structures definitions in HiiDatabase.
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -390,10 +390,10 @@ typedef struct _HII_DATABASE_PRIVATE_DATA { @param BufferLen The length of the Buffer in bytes.
- @param Buffer Points to a buffer which will be converted to be the
+ @param Buffer Points to a buffer which will be converted to be the
content of the generated string.
- @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
+ @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
UINT8 *; if 2, the buffer contains unicode string for the value of NAME;
if 3, the buffer contains other data.
@@ -460,21 +460,21 @@ IsFontInfoExisted ( /**
This function invokes the matching registered function.
-
+
@param Private HII Database driver private structure.
@param NotifyType The type of change concerning the database.
@param PackageInstance Points to the package referred to by the notification.
@param PackageType Package type
@param Handle The handle of the package list which contains the specified package.
-
- @retval EFI_SUCCESS Already checked all registered function and invoked
+
+ @retval EFI_SUCCESS Already checked all registered function and invoked
if matched.
@retval EFI_INVALID_PARAMETER Any input parameter is not valid.
-
+
**/
EFI_STATUS
InvokeRegisteredFunction (
- IN HII_DATABASE_PRIVATE_DATA *Private,
+ IN HII_DATABASE_PRIVATE_DATA *Private,
IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
IN VOID *PackageInstance,
IN UINT8 PackageType,
@@ -508,7 +508,7 @@ GetSystemFont ( /**
Parse all string blocks to find a String block specified by StringId.
If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
- within this string package and backup its information. If LastStringId is
+ within this string package and backup its information. If LastStringId is
specified, the string id of last string block will also be output.
If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
@@ -734,8 +734,8 @@ HiiStringToImage ( RowInfoArray or Blt.
@retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
@retval EFI_INVALID_PARAMETER Flags were invalid combination.
- @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
- in the specified PackageList.
+ @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
+ in the specified PackageList.
**/
EFI_STATUS
@@ -806,7 +806,7 @@ HiiGetGlyph ( @param StringInfoOut Upon return, contains the matching font's information.
If NULL, then no information is returned. This buffer
is allocated with a call to the Boot Service AllocatePool().
- It is the caller's responsibility to call the Boot
+ It is the caller's responsibility to call the Boot
Service FreePool() when the caller no longer requires
the contents of StringInfoOut.
@param String Points to the string which will be tested to
@@ -1067,7 +1067,7 @@ HiiDrawImage ( @retval EFI_SUCCESS The image was successfully drawn.
@retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
@retval EFI_INVALID_PARAMETER The Blt was NULL.
- @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
+ @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
The specified PackageList is not in the database.
**/
@@ -1654,7 +1654,7 @@ HiiListPackageLists ( @retval EFI_NOT_FOUND The specified Handle could not be found in the
current database.
@retval EFI_INVALID_PARAMETER BufferSize was NULL.
- @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
+ @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
and Buffer was NULL.
**/
@@ -1725,7 +1725,7 @@ HiiRegisterPackageNotify ( unregistered.
@retval EFI_SUCCESS Notification is unregistered successfully.
- @retval EFI_NOT_FOUND The incoming notification handle does not exist
+ @retval EFI_NOT_FOUND The incoming notification handle does not exist
in current hii database.
**/
@@ -1912,8 +1912,8 @@ HiiConfigRoutingExtractConfig ( instance.
@param Results Null-terminated Unicode string in
<MultiConfigAltResp> format which has all values
- filled in for the entirety of the current HII
- database. String to be allocated by the called
+ filled in for the entirety of the current HII
+ database. String to be allocated by the called
function. De-allocation is up to the caller.
@retval EFI_SUCCESS The Results string is filled with the values
@@ -2064,7 +2064,7 @@ HiiBlockToConfig ( value pair. Block is left updated and
Progress points at the '&' preceding the first
non-<BlockName>.
- @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
+ @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
BlockSize is updated with the required buffer size.
**/
@@ -2136,18 +2136,18 @@ HiiGetAltCfg ( This function accepts a <MultiKeywordResp> formatted string, finds the associated
keyword owners, creates a <MultiConfigResp> string from it and forwards it to the
EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
-
- If there is an issue in resolving the contents of the KeywordString, then the
- function returns an error and also sets the Progress and ProgressErr with the
+
+ If there is an issue in resolving the contents of the KeywordString, then the
+ function returns an error and also sets the Progress and ProgressErr with the
appropriate information about where the issue occurred and additional data about
- the nature of the issue.
-
+ the nature of the issue.
+
In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND
error is generated during processing the second or later keyword element, the system
- storage associated with earlier keywords is not modified. All elements of the
+ storage associated with earlier keywords is not modified. All elements of the
KeywordString must successfully pass all tests for format and access prior to making
any modifications to storage.
-
+
In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString
containing multiple keywords, the state of storage associated with earlier keywords
is undefined.
@@ -2155,18 +2155,18 @@ HiiGetAltCfg ( @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
- @param KeywordString A null-terminated string in <MultiKeywordResp> format.
+ @param KeywordString A null-terminated string in <MultiKeywordResp> format.
- @param Progress On return, points to a character in the KeywordString.
- Points to the string's NULL terminator if the request
- was successful. Points to the most recent '&' before
+ @param Progress On return, points to a character in the KeywordString.
+ Points to the string's NULL terminator if the request
+ was successful. Points to the most recent '&' before
the first failing name / value pair (or the beginning
of the string if the failure is in the first name / value
pair) if the request was not successful.
@param ProgressErr If during the processing of the KeywordString there was
- a failure, this parameter gives additional information
- about the possible source of the problem. The various
+ a failure, this parameter gives additional information
+ about the possible source of the problem. The various
errors are defined in "Related Definitions" below.
@@ -2174,16 +2174,16 @@ HiiGetAltCfg ( @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
1. KeywordString is NULL.
- 2. Parsing of the KeywordString resulted in an
+ 2. Parsing of the KeywordString resulted in an
error. See Progress and ProgressErr for more data.
- @retval EFI_NOT_FOUND An element of the KeywordString was not found.
+ @retval EFI_NOT_FOUND An element of the KeywordString was not found.
See ProgressErr for more data.
- @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
+ @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
See ProgressErr for more data.
-
- @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
+
+ @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
for more data.
@retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
@@ -2191,7 +2191,7 @@ HiiGetAltCfg ( **/
EFI_STATUS
-EFIAPI
+EFIAPI
EfiConfigKeywordHandlerSetData (
IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
IN CONST EFI_STRING KeywordString,
@@ -2201,56 +2201,56 @@ EfiConfigKeywordHandlerSetData ( /**
- This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
+ This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the
EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
-
+
If there is an issue in resolving the contents of the KeywordString, then the function
returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the
appropriate information about where the issue occurred and additional data about the
nature of the issue.
-
+
In the case when KeywordString is NULL, or contains multiple keywords, or when
EFI_NOT_FOUND is generated while processing the keyword elements, the Results string
- contains values returned for all keywords processed prior to the keyword generating the
+ contains values returned for all keywords processed prior to the keyword generating the
error but no values for the keyword with error or any following keywords.
-
+
@param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
-
+
@param NameSpaceId A null-terminated string containing the platform configuration
language to search through in the system. If a NULL is passed
in, then it is assumed that any platform configuration language
with the prefix of "x-UEFI-" are searched.
-
+
@param KeywordString A null-terminated string in <MultiKeywordRequest> format. If a
- NULL is passed in the KeywordString field, all of the known
- keywords in the system for the NameSpaceId specified are
+ NULL is passed in the KeywordString field, all of the known
+ keywords in the system for the NameSpaceId specified are
returned in the Results field.
-
+
@param Progress On return, points to a character in the KeywordString. Points
- to the string's NULL terminator if the request was successful.
+ to the string's NULL terminator if the request was successful.
Points to the most recent '&' before the first failing name / value
pair (or the beginning of the string if the failure is in the first
name / value pair) if the request was not successful.
-
+
@param ProgressErr If during the processing of the KeywordString there was a
- failure, this parameter gives additional information about the
+ failure, this parameter gives additional information about the
possible source of the problem. See the definitions in SetData()
for valid value definitions.
-
+
@param Results A null-terminated string in <MultiKeywordResp> format is returned
- which has all the values filled in for the keywords in the
+ which has all the values filled in for the keywords in the
KeywordString. This is a callee-allocated field, and must be freed
- by the caller after being used.
+ by the caller after being used.
@retval EFI_SUCCESS The specified action was completed successfully.
-
+
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
1.Progress, ProgressErr, or Results is NULL.
2.Parsing of the KeywordString resulted in an error. See
Progress and ProgressErr for more data.
-
+
@retval EFI_NOT_FOUND An element of the KeywordString was not found. See
ProgressErr for more data.
@@ -2260,7 +2260,7 @@ EfiConfigKeywordHandlerSetData ( @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See
ProgressErr for more data.
-
+
@retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for
more data.
@@ -2269,12 +2269,12 @@ EfiConfigKeywordHandlerSetData ( **/
EFI_STATUS
-EFIAPI
+EFIAPI
EfiConfigKeywordHandlerGetData (
IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
IN CONST EFI_STRING NameSpaceId, OPTIONAL
IN CONST EFI_STRING KeywordString, OPTIONAL
- OUT EFI_STRING *Progress,
+ OUT EFI_STRING *Progress,
OUT UINT32 *ProgressErr,
OUT EFI_STRING *Results
);
@@ -2298,11 +2298,11 @@ HiiCompareLanguage ( /**
Retrieves a pointer to a Null-terminated ASCII string containing the list
- of languages that an HII handle in the HII Database supports. The returned
+ of languages that an HII handle in the HII Database supports. The returned
string is allocated using AllocatePool(). The caller is responsible for freeing
the returned string using FreePool(). The format of the returned string follows
the language format assumed the HII Database.
-
+
If HiiHandle is NULL, then ASSERT().
@param[in] HiiHandle A handle that was previously registered in the HII Database.
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.uni b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.uni index 58f2208..43c6805 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.uni +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.uni @@ -4,13 +4,13 @@ // This driver produces all required HII serivces that includes HiiDataBase, HiiString,
// HiiFont, HiiConfigRouting. To support UEFI HII, this driver is required.
//
-// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
// which accompanies this distribution. The full text of the license may be found at
// http://opensource.org/licenses/bsd-license.php
-//
+//
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf index adb3603..0593ff8 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf @@ -4,14 +4,14 @@ # This driver produces all required HII serivces that includes HiiDataBase, HiiString,
# HiiFont, HiiConfigRouting. To support UEFI HII, this driver is required.
#
-# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#
@@ -81,7 +81,7 @@ gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdNvStoreDefaultValueBuffer ## CONSUMES
-[Guids]
+[Guids]
#
# Event registered to EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID group,
# which will be triggered by EFI_HII_DATABASE_PROTOCOL.SetKeyboardLayout().
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c index 9d09c60..5951b5e 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c @@ -2,7 +2,7 @@ This file contains the entry code to the HII database, which is defined by
UEFI 2.1 specification.
-Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -188,7 +188,7 @@ InitializeHiiDatabase ( ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiStringProtocolGuid);
ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiConfigRoutingProtocolGuid);
ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiConfigKeywordHandlerProtocolGuid);
-
+
InitializeListHead (&mPrivate.DatabaseList);
InitializeListHead (&mPrivate.DatabaseNotifyList);
InitializeListHead (&mPrivate.HiiHandleList);
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseExtra.uni b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseExtra.uni index d85eef1..6fbd75a 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseExtra.uni +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseExtra.uni @@ -1,7 +1,7 @@ // /** @file
// HiiDatabase Localized Strings and Content
//
-// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
@@ -13,8 +13,8 @@ //
// **/
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
+#string STR_PROPERTIES_MODULE_NAME
+#language en-US
"HII Database DXE Driver"
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c index 431a5b8..d101082 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c @@ -2,7 +2,7 @@ Implementation for EFI_HII_IMAGE_PROTOCOL.
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1018,7 +1018,7 @@ HiiGetImage ( @retval EFI_SUCCESS The new image was updated successfully.
@retval EFI_NOT_FOUND The image specified by ImageId is not in the
- database. The specified PackageList is not in the database.
+ database. The specified PackageList is not in the database.
@retval EFI_INVALID_PARAMETER The Image was NULL.
**/
@@ -1426,8 +1426,8 @@ HiiDrawImage ( @retval EFI_SUCCESS The image was successfully drawn.
@retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
@retval EFI_INVALID_PARAMETER The Blt was NULL.
- @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
- The specified PackageList is not in the database.
+ @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
+ The specified PackageList is not in the database.
**/
EFI_STATUS
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c index d5a7488..aeda474 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c @@ -2,7 +2,7 @@ Implementation for EFI_HII_STRING_PROTOCOL.
-Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -236,7 +236,7 @@ GetStringFontInfo ( /**
Parse all string blocks to find a String block specified by StringId.
If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
- within this string package and backup its information. If LastStringId is
+ within this string package and backup its information. If LastStringId is
specified, the string id of last string block will also be output.
If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
@@ -524,7 +524,7 @@ FindStringBlock ( // Since string package tool set FontId initially to 0 and increases it
// progressively by one, StringPackage->FondId always represents an unique
// and available FontId.
- //
+ //
StringPackage->FontId++;
FreePool (FontInfo);
@@ -574,7 +574,7 @@ FindStringBlock ( *StartStringId = CurrentStringId;
}
}
-
+
//
// Get last string ID
//
@@ -681,7 +681,7 @@ GetStringWorker ( }
//
- // Get the string font. The FontId 0 is the default font for those string blocks which
+ // Get the string font. The FontId 0 is the default font for those string blocks which
// do not specify a font identifier. If default font is not specified, return NULL.
//
if (StringFontInfo != NULL) {
@@ -706,17 +706,17 @@ GetStringWorker ( /**
If GetStringBlock find the StringId's string is not saved in the exist string block,
- this function will create the UCS2 string block to save the string; also split the
+ this function will create the UCS2 string block to save the string; also split the
skip block into two or one skip block.
This is a internal function.
-
+
@param StringPackage Hii string package instance.
@param StartStringId The first id in the skip block which StringId in the block.
@param StringId The string's id, which is unique within
- PackageList.
- @param BlockType Output the block type of found string block.
- @param StringBlockAddr Output the block address of found string block.
+ PackageList.
+ @param BlockType Output the block type of found string block.
+ @param StringBlockAddr Output the block address of found string block.
@param FontBlock whether this string block has font info.
@retval EFI_SUCCESS The string font is outputted successfully.
@@ -735,7 +735,7 @@ InsertLackStringBlock ( {
UINT8 *BlockPtr;
UINT8 *StringBlock;
- UINT32 SkipLen;
+ UINT32 SkipLen;
UINT32 OldBlockSize;
UINT32 NewBlockSize;
UINT32 FrontSkipNum;
@@ -746,7 +746,7 @@ InsertLackStringBlock ( FrontSkipNum = 0;
SkipLen = 0;
OldStringAddr = *StringBlockAddr;
-
+
ASSERT (*BlockType == EFI_HII_SIBT_SKIP1 || *BlockType == EFI_HII_SIBT_SKIP2);
//
// Old skip block size.
@@ -757,7 +757,7 @@ InsertLackStringBlock ( } else {
SkipLen = sizeof (EFI_HII_SIBT_SKIP2_BLOCK);
IdCount = *(UINT16*)(OldStringAddr + sizeof (EFI_HII_STRING_BLOCK));
- }
+ }
//
// New create UCS or UCS2 block size.
@@ -801,7 +801,7 @@ InsertLackStringBlock ( //
// Copy old block in front of skip block.
//
- CopyMem (StringBlock, StringPackage->StringBlock, OldStringAddr - StringPackage->StringBlock);
+ CopyMem (StringBlock, StringPackage->StringBlock, OldStringAddr - StringPackage->StringBlock);
BlockPtr = StringBlock + (OldStringAddr - StringPackage->StringBlock);
if (FrontSkipNum > 0) {
@@ -838,7 +838,7 @@ InsertLackStringBlock ( //
// Append a EFI_HII_SIBT_END block to the end.
//
- CopyMem (BlockPtr, OldStringAddr + SkipLen, OldBlockSize - (OldStringAddr - StringPackage->StringBlock) - SkipLen);
+ CopyMem (BlockPtr, OldStringAddr + SkipLen, OldBlockSize - (OldStringAddr - StringPackage->StringBlock) - SkipLen);
if (FontBlock) {
*BlockType = EFI_HII_SIBT_STRING_UCS2_FONT;
@@ -918,9 +918,9 @@ SetStringWorker ( &StartStringId
);
if (EFI_ERROR (Status) && (BlockType == EFI_HII_SIBT_SKIP1 || BlockType == EFI_HII_SIBT_SKIP2)) {
- Status = InsertLackStringBlock(StringPackage,
- StartStringId,
- StringId,
+ Status = InsertLackStringBlock(StringPackage,
+ StartStringId,
+ StringId,
&BlockType,
&StringBlockAddr,
(BOOLEAN)(StringFontInfo != NULL)
@@ -947,11 +947,11 @@ SetStringWorker ( return EFI_INVALID_PARAMETER;
} else {
Referred = ReferFontInfoLocally (
- Private,
- StringPackage,
- StringPackage->FontId,
- FALSE,
- GlobalFont,
+ Private,
+ StringPackage,
+ StringPackage->FontId,
+ FALSE,
+ GlobalFont,
&LocalFont
);
if (!Referred) {
@@ -962,7 +962,7 @@ SetStringWorker ( // Update the FontId of the specified string block to input font info.
//
switch (BlockType) {
- case EFI_HII_SIBT_STRING_SCSU_FONT:
+ case EFI_HII_SIBT_STRING_SCSU_FONT:
case EFI_HII_SIBT_STRINGS_SCSU_FONT:
case EFI_HII_SIBT_STRING_UCS2_FONT:
case EFI_HII_SIBT_STRINGS_UCS2_FONT:
@@ -973,7 +973,7 @@ SetStringWorker ( // When modify the font info of these blocks, the block type should be updated
// to contain font info thus the whole structure should be revised.
// It is recommended to use tool to modify the block type not in the code.
- //
+ //
return EFI_UNSUPPORTED;
}
}
@@ -1004,7 +1004,7 @@ SetStringWorker ( }
*BlockPtr++ = 0;
-
+
TmpSize = OldBlockSize - (StringTextPtr - StringPackage->StringBlock) - AsciiStrSize ((CHAR8 *) StringTextPtr);
CopyMem (
BlockPtr,
@@ -1107,9 +1107,9 @@ SetStringWorker ( /**
This function adds the string String to the group of strings owned by PackageList, with the
- specified font information StringFontInfo and returns a new string id.
- The new string identifier is guaranteed to be unique within the package list.
- That new string identifier is reserved for all languages in the package list.
+ specified font information StringFontInfo and returns a new string id.
+ The new string identifier is guaranteed to be unique within the package list.
+ That new string identifier is reserved for all languages in the package list.
@param This A pointer to the EFI_HII_STRING_PROTOCOL instance.
@@ -1341,7 +1341,7 @@ HiiNewString ( // Calculate the length of the string blocks, including string block to record
// printable language full name and EFI_HII_SIBT_END_BLOCK.
//
- Ucs2BlockSize = (UINT32) (StrSize ((CHAR16 *) LanguageName) +
+ Ucs2BlockSize = (UINT32) (StrSize ((CHAR16 *) LanguageName) +
(*StringId - 1) * sizeof (EFI_HII_SIBT_STRING_UCS2_BLOCK) - sizeof (CHAR16));
BlockSize = Ucs2BlockSize + sizeof (EFI_HII_SIBT_END_BLOCK);
@@ -1519,7 +1519,7 @@ HiiNewString ( PackageListNode->PackageListHdr.PackageLength += FontBlockSize + Ucs2FontBlockSize;
//
- // Increase the FontId to make it unique since we already add
+ // Increase the FontId to make it unique since we already add
// a EFI_HII_SIBT_FONT block to this string package.
//
StringPackage->FontId++;
@@ -1671,16 +1671,16 @@ HiiGetString ( //
// Second search: to match the StringId in other available languages if exist.
//
- for (Link = PackageListNode->StringPkgHdr.ForwardLink;
+ for (Link = PackageListNode->StringPkgHdr.ForwardLink;
Link != &PackageListNode->StringPkgHdr;
Link = Link->ForwardLink
) {
- StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE);
+ StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE);
Status = GetStringWorker (Private, StringPackage, StringId, NULL, NULL, NULL);
if (!EFI_ERROR (Status)) {
return EFI_INVALID_LANGUAGE;
}
- }
+ }
}
return EFI_NOT_FOUND;
@@ -1940,7 +1940,7 @@ HiiGetSecondaryLanguages ( Private = HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS (This);
- PackageListNode = NULL;
+ PackageListNode = NULL;
for (Link = Private->DatabaseList.ForwardLink; Link != &Private->DatabaseList; Link = Link->ForwardLink) {
DatabaseRecord = CR (Link, HII_DATABASE_RECORD, DatabaseEntry, HII_DATABASE_RECORD_SIGNATURE);
if (DatabaseRecord->Handle == PackageList) {
@@ -1951,7 +1951,7 @@ HiiGetSecondaryLanguages ( if (PackageListNode == NULL) {
return EFI_NOT_FOUND;
}
-
+
Languages = NULL;
ResultSize = 0;
for (Link1 = PackageListNode->StringPkgHdr.ForwardLink;
|