summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/UefiHiiLib
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-06-27 21:08:52 +0800
committerLiming Gao <liming.gao@intel.com>2018-06-28 11:19:45 +0800
commitd1102dba7210b95e41d06c2338a22ba6af248645 (patch)
tree8b4af076b5d6f2aa7f35563d4defcca4d4bfdd87 /MdeModulePkg/Library/UefiHiiLib
parentca79bab7af4770c5eb578f6d495af01705aedb79 (diff)
downloadedk2-d1102dba7210b95e41d06c2338a22ba6af248645.tar.gz
edk2-d1102dba7210b95e41d06c2338a22ba6af248645.tar.bz2
edk2-d1102dba7210b95e41d06c2338a22ba6af248645.zip
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/Library/UefiHiiLib')
-rw-r--r--MdeModulePkg/Library/UefiHiiLib/HiiLanguage.c12
-rw-r--r--MdeModulePkg/Library/UefiHiiLib/HiiLib.c388
-rw-r--r--MdeModulePkg/Library/UefiHiiLib/HiiString.c104
-rw-r--r--MdeModulePkg/Library/UefiHiiLib/InternalHiiLib.h16
-rw-r--r--MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.uni4
5 files changed, 262 insertions, 262 deletions
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLanguage.c b/MdeModulePkg/Library/UefiHiiLib/HiiLanguage.c
index f4ef36cec2..aca0606f0b 100644
--- a/MdeModulePkg/Library/UefiHiiLib/HiiLanguage.c
+++ b/MdeModulePkg/Library/UefiHiiLib/HiiLanguage.c
@@ -1,7 +1,7 @@
/** @file
Language related HII Library implementation.
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 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
@@ -16,12 +16,12 @@
#include "InternalHiiLib.h"
/**
- 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.
@@ -53,8 +53,8 @@ HiiGetSupportedLanguages (
Status = gHiiString->GetLanguages (gHiiString, 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
//
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
index f9b8c3df27..3f43c7c8e6 100644
--- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
+++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
@@ -1,7 +1,7 @@
/** @file
HII Library implementation that uses DXE protocols and services.
- Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 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 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR16 mConfigHdrTemplate[] = L"GUID=0000000
EFI_FORM_BROWSER2_PROTOCOL *mUefiFormBrowser2 = NULL;
//
-// Template used to mark the end of a list of packages
+// Template used to mark the end of a list of packages
//
GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_HII_PACKAGE_HEADER mEndOfPakageList = {
sizeof (EFI_HII_PACKAGE_HEADER),
@@ -85,7 +85,7 @@ InternalHiiExtractGuidFromHiiHandle (
Status = gHiiDatabase->ExportPackageLists (gHiiDatabase, Handle, &BufferSize, HiiPackageList);
ASSERT (Status != EFI_NOT_FOUND);
-
+
if (Status == EFI_BUFFER_TOO_SMALL) {
HiiPackageList = AllocatePool (BufferSize);
ASSERT (HiiPackageList != NULL);
@@ -115,7 +115,7 @@ InternalHiiExtractGuidFromHiiHandle (
If an empty list of packages is passed in, then NULL is returned. If the size of
the list of package is 0, then NULL is returned.
- The variable arguments are pointers which point to package header that defined
+ The variable arguments are pointers which point to package header that defined
by UEFI VFR compiler and StringGather tool.
#pragma pack (push, 1)
@@ -124,13 +124,13 @@ InternalHiiExtractGuidFromHiiHandle (
EFI_HII_PACKAGE_HEADER PackageHeader;
} EDKII_AUTOGEN_PACKAGES_HEADER;
#pragma pack (pop)
-
+
@param[in] PackageListGuid The GUID of the package list.
- @param[in] DeviceHandle If not NULL, the Device Handle on which
+ @param[in] DeviceHandle If not NULL, the Device Handle on which
an instance of DEVICE_PATH_PROTOCOL is installed.
- This Device Handle uniquely defines the device that
+ This Device Handle uniquely defines the device that
the added packages are associated with.
- @param[in] ... The variable argument list that contains pointers
+ @param[in] ... The variable argument list that contains pointers
to packages terminated by a NULL.
@retval NULL A HII Handle has already been registered in the HII Database with
@@ -168,7 +168,7 @@ HiiAddPackages (
VA_END (Args);
//
- // If there are no packages in the variable argument list or all the packages
+ // If there are no packages in the variable argument list or all the packages
// are empty, then return a NULL HII Handle
//
if (Length == 0) {
@@ -176,7 +176,7 @@ HiiAddPackages (
}
//
- // Add the length of the Package List Header and the terminating Package Header
+ // Add the length of the Package List Header and the terminating Package Header
//
Length += sizeof (EFI_HII_PACKAGE_LIST_HEADER) + sizeof (EFI_HII_PACKAGE_HEADER);
@@ -222,9 +222,9 @@ HiiAddPackages (
// Register the package list with the HII Database
//
Status = gHiiDatabase->NewPackageList (
- gHiiDatabase,
- PackageListHeader,
- DeviceHandle,
+ gHiiDatabase,
+ PackageListHeader,
+ DeviceHandle,
&HiiHandle
);
if (EFI_ERROR (Status)) {
@@ -272,12 +272,12 @@ HiiRemovePackages (
This function allocates the returned array using AllocatePool().
The caller is responsible for freeing the array with FreePool().
- @param[in] PackageListGuid An optional parameter that is used to request
+ @param[in] PackageListGuid An optional parameter that is used to request
HII Handles associated with a specific
Package List GUID. If this parameter is NULL,
then all the HII Handles in the HII Database
are returned. If this parameter is not NULL,
- then zero or more HII Handles associated with
+ then zero or more HII Handles associated with
PackageListGuid are returned.
@retval NULL No HII handles were found in the HII database
@@ -312,14 +312,14 @@ HiiGetHiiHandles (
);
//
- // If ListPackageLists() returns EFI_SUCCESS for a zero size,
- // then there are no HII handles in the HII database. If ListPackageLists()
- // returns an error other than EFI_BUFFER_TOO_SMALL, then there are no HII
+ // If ListPackageLists() returns EFI_SUCCESS for a zero size,
+ // then there are no HII handles in the HII database. If ListPackageLists()
+ // returns an error other than EFI_BUFFER_TOO_SMALL, then there are no HII
// handles in the HII database.
//
if (Status != EFI_BUFFER_TOO_SMALL) {
//
- // Return NULL if the size can not be retrieved, or if there are no HII
+ // Return NULL if the size can not be retrieved, or if there are no HII
// handles in the HII Database
//
return NULL;
@@ -364,7 +364,7 @@ HiiGetHiiHandles (
Status = InternalHiiExtractGuidFromHiiHandle (HiiHandleBuffer[Index1], &Guid);
ASSERT_EFI_ERROR (Status);
if (CompareGuid (&Guid, PackageListGuid)) {
- HiiHandleBuffer[Index2++] = HiiHandleBuffer[Index1];
+ HiiHandleBuffer[Index2++] = HiiHandleBuffer[Index1];
}
}
if (Index2 > 0) {
@@ -379,7 +379,7 @@ HiiGetHiiHandles (
/**
This function allows a caller to extract the form set opcode form the Hii Handle.
- The returned buffer is allocated using AllocatePool().The caller is responsible
+ The returned buffer is allocated using AllocatePool().The caller is responsible
for freeing the allocated buffer using FreePool().
@param Handle The HII handle.
@@ -503,7 +503,7 @@ Done:
}
/**
- Converts all hex dtring characters in range ['A'..'F'] to ['a'..'f'] for
+ Converts all hex dtring characters in range ['A'..'F'] to ['a'..'f'] for
hex digits that appear between a '=' and a '&' in a config string.
If ConfigString is NULL, then ASSERT().
@@ -541,7 +541,7 @@ InternalHiiLowerConfigString (
}
/**
- Uses the BlockToConfig() service of the Config Routing Protocol to
+ Uses the BlockToConfig() service of the Config Routing Protocol to
convert <ConfigRequest> and a buffer to a <ConfigResp>
If ConfigRequest is NULL, then ASSERT().
@@ -588,14 +588,14 @@ InternalHiiBlockToConfig (
}
/**
- Uses the BrowserCallback() service of the Form Browser Protocol to retrieve
- or set uncommitted data. If sata i being retrieved, then the buffer is
- allocated using AllocatePool(). The caller is then responsible for freeing
+ Uses the BrowserCallback() service of the Form Browser Protocol to retrieve
+ or set uncommitted data. If sata i being retrieved, then the buffer is
+ allocated using AllocatePool(). The caller is then responsible for freeing
the buffer using FreePool().
- @param[in] VariableGuid Pointer to an EFI_GUID structure. This is an optional
+ @param[in] VariableGuid Pointer to an EFI_GUID structure. This is an optional
parameter that may be NULL.
- @param[in] VariableName Pointer to a Null-terminated Unicode string. This
+ @param[in] VariableName Pointer to a Null-terminated Unicode string. This
is an optional parameter that may be NULL.
@param[in] SetResultsData If not NULL, then this parameter specified the buffer
of uncommited data to set. If this parameter is NULL,
@@ -648,7 +648,7 @@ InternalHiiBrowserCallback (
VariableGuid,
VariableName
);
-
+
if (!EFI_ERROR (Status)) {
//
// No Resluts Data, only allocate one char for '\0'
@@ -689,23 +689,23 @@ InternalHiiBrowserCallback (
}
/**
- Allocates and returns a Null-terminated Unicode <ConfigHdr> string using routing
+ Allocates and returns a Null-terminated Unicode <ConfigHdr> string using routing
information that includes a GUID, an optional Unicode string name, and a device
- path. The string returned is allocated with AllocatePool(). The caller is
+ path. The string returned is allocated with AllocatePool(). The caller is
responsible for freeing the allocated string with FreePool().
-
+
The format of a <ConfigHdr> is as follows:
GUID=<HexCh>32&NAME=<Char>NameLength&PATH=<HexChar>DevicePathSize<Null>
@param[in] Guid Pointer to an EFI_GUID that is the routing information
- GUID. Each of the 16 bytes in Guid is converted to
+ GUID. Each of the 16 bytes in Guid is converted to
a 2 Unicode character hexadecimal string. This is
an optional parameter that may be NULL.
- @param[in] Name Pointer to a Null-terminated Unicode string that is
- the routing information NAME. This is an optional
- parameter that may be NULL. Each 16-bit Unicode
- character in Name is converted to a 4 character Unicode
+ @param[in] Name Pointer to a Null-terminated Unicode string that is
+ the routing information NAME. This is an optional
+ parameter that may be NULL. Each 16-bit Unicode
+ character in Name is converted to a 4 character Unicode
hexadecimal string.
@param[in] DriverHandle The driver handle which supports a Device Path Protocol
that is the routing information PATH. Each byte of
@@ -734,7 +734,7 @@ HiiConstructConfigHdr (
UINTN MaxLen;
//
- // 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;
@@ -790,7 +790,7 @@ HiiConstructConfigHdr (
String += StrnLenS (String, MaxLen - ((UINTN)String - (UINTN)ReturnString) / sizeof (CHAR16));
}
}
-
+
//
// Append L"&NAME="
//
@@ -845,7 +845,7 @@ HiiConstructConfigHdr (
}
/**
- Convert the hex UNICODE encoding string of UEFI GUID, NAME or device path
+ Convert the hex UNICODE encoding string of UEFI GUID, NAME or device path
to binary buffer from <ConfigHdr>.
This is a internal function.
@@ -878,7 +878,7 @@ InternalHiiGetBufferFromString (
if (String == NULL || Buffer == NULL) {
return EFI_INVALID_PARAMETER;
}
-
+
DataBuffer = NULL;
StringPtr = NULL;
ConfigHdr = String;
@@ -913,14 +913,14 @@ InternalHiiGetBufferFromString (
DataBuffer [Index/2] = (UINT8) ((DataBuffer [Index/2] << 4) + DigitUint8);
}
}
-
+
*Buffer = DataBuffer;
break;
case NAME_CONFIG_STRING_TYPE:
//
// Convert Config String to Unicode String, e.g. "0041004200430044" => "ABCD"
- //
+ //
//
// Add the tailling char L'\0'
@@ -956,10 +956,10 @@ InternalHiiGetBufferFromString (
/**
This function checks VarOffset and VarWidth is in the block range.
- @param BlockArray The block array is to be checked.
+ @param BlockArray The block array is to be checked.
@param VarOffset Offset of var to the structure
@param VarWidth Width of var.
-
+
@retval TRUE This Var is in the block range.
@retval FALSE This Var is not in the block range.
**/
@@ -972,14 +972,14 @@ BlockArrayCheck (
{
LIST_ENTRY *Link;
IFR_BLOCK_DATA *BlockData;
-
+
//
// No Request Block array, all vars are got.
//
if (BlockArray == NULL) {
return TRUE;
}
-
+
//
// Check the input var is in the request block range.
//
@@ -1036,7 +1036,7 @@ InternalHiiGetValueOfNumber (
StringPtr++;
}
Length = StringPtr - ValueString;
-
+
//
// Allocate buffer to store the value
//
@@ -1044,7 +1044,7 @@ InternalHiiGetValueOfNumber (
if (Buf == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
+
//
// Convert character one by one to the value buffer
//
@@ -1058,7 +1058,7 @@ InternalHiiGetValueOfNumber (
Buf [Index/2] = (UINT8) ((DigitUint8 << 4) + Buf [Index/2]);
}
}
-
+
//
// Set the converted value and string length.
//
@@ -1073,7 +1073,7 @@ InternalHiiGetValueOfNumber (
@param ConfigElement ConfigResp string contains the current setting.
@param VarName The variable name which need to get value.
@param VarValue The return value.
-
+
@retval EFI_SUCCESS Get the value for the VarName
@retval EFI_OUT_OF_RESOURCES The memory is not enough.
**/
@@ -1131,7 +1131,7 @@ GetValueFromRequest (
@param RequestElement The config string for this storage.
@param HiiHandle The HiiHandle for this formset.
@param NameValueType Whether current storage is name/value varstore or not.
-
+
@retval EFI_SUCCESS The current setting is valid.
@retval EFI_OUT_OF_RESOURCES The memory is not enough.
@retval EFI_INVALID_PARAMETER The config string or the Hii package is invalid.
@@ -1279,8 +1279,8 @@ ValidateQuestionFromVfr (
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)) {
@@ -1327,12 +1327,12 @@ ValidateQuestionFromVfr (
//
//
- // OneOf question is not in IFR Form. This IFR form is not valid.
+ // OneOf question is not in IFR Form. This IFR form is not valid.
//
if (VarStoreData.VarStoreId == 0) {
return EFI_INVALID_PARAMETER;
}
- //
+ //
// Check whether this question is for the requested varstore.
//
IfrOneOf = (EFI_IFR_ONE_OF *) IfrOpHdr;
@@ -1382,11 +1382,11 @@ ValidateQuestionFromVfr (
break;
}
//
- // Check this var question is in the var storage
+ // Check this var question is in the var storage
//
if ((Offset + Width) > VarStoreData.Size) {
//
- // This question exceeds the var store size.
+ // This question exceeds the var store size.
//
return EFI_INVALID_PARAMETER;
}
@@ -1419,7 +1419,7 @@ ValidateQuestionFromVfr (
//
//
- // Numeric question is not in IFR Form. This IFR form is not valid.
+ // Numeric question is not in IFR Form. This IFR form is not valid.
//
if (VarStoreData.VarStoreId == 0) {
return EFI_INVALID_PARAMETER;
@@ -1442,7 +1442,7 @@ ValidateQuestionFromVfr (
//
break;
}
-
+
Status = GetValueFromRequest (RequestElement, QuestionName, &VarValue);
if (EFI_ERROR (Status)) {
return Status;
@@ -1474,11 +1474,11 @@ ValidateQuestionFromVfr (
break;
}
//
- // Check this var question is in the var storage
+ // Check this var question is in the var storage
//
if ((Offset + Width) > VarStoreData.Size) {
//
- // This question exceeds the var store size.
+ // This question exceeds the var store size.
//
return EFI_INVALID_PARAMETER;
}
@@ -1598,7 +1598,7 @@ ValidateQuestionFromVfr (
//
//
- // 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 (VarStoreData.VarStoreId == 0) {
return EFI_INVALID_PARAMETER;
@@ -1622,7 +1622,7 @@ ValidateQuestionFromVfr (
//
break;
}
-
+
Status = GetValueFromRequest (RequestElement, QuestionName, &VarValue);
if (EFI_ERROR (Status)) {
return Status;
@@ -1654,11 +1654,11 @@ ValidateQuestionFromVfr (
break;
}
//
- // Check this var question is in the var storage
+ // Check this var question is in the var storage
//
if ((Offset + Width) > VarStoreData.Size) {
//
- // This question exceeds the var store size.
+ // This question exceeds the var store size.
//
return EFI_INVALID_PARAMETER;
}
@@ -1691,7 +1691,7 @@ ValidateQuestionFromVfr (
//
//
- // 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 (VarStoreData.VarStoreId == 0) {
return EFI_INVALID_PARAMETER;
@@ -1726,9 +1726,9 @@ ValidateQuestionFromVfr (
//
// Skip the "=".
- //
+ //
StringPtr += 1;
-
+
//
// Check current string length is less than maxsize
// e.g Config String: "0041004200430044", Unicode String: "ABCD". Unicode String length = Config String length / 4.
@@ -1755,11 +1755,11 @@ ValidateQuestionFromVfr (
break;
}
//
- // Check this var question is in the var storage
+ // Check this var question is in the var storage
//
if ((Offset + Width) > VarStoreData.Size) {
//
- // This question exceeds the var store size.
+ // This question exceeds the var store size.
//
return EFI_INVALID_PARAMETER;
}
@@ -1774,7 +1774,7 @@ ValidateQuestionFromVfr (
break;
case EFI_IFR_ONE_OF_OPTION_OP:
//
- // Opcode Scope is zero. This one of option is not to be checked.
+ // Opcode Scope is zero. This one of option is not to be checked.
//
if (VarBlockData.Scope == 0) {
break;
@@ -1810,7 +1810,7 @@ ValidateQuestionFromVfr (
}
//
- // OneOf value doesn't belong to one of option value.
+ // OneOf value doesn't belong to one of option value.
//
if ((VarBlockData.Scope == 0) && (VarBlockData.OpCode == EFI_IFR_ONE_OF_OP)) {
return EFI_INVALID_PARAMETER;
@@ -1856,7 +1856,7 @@ ValidateQuestionFromVfr (
@param ConfigElement ConfigResp element string contains the current setting.
@param CurrentBlockArray Current block array.
@param VarBuffer Data buffer for this varstore.
-
+
@retval EFI_SUCCESS The current setting is valid.
@retval EFI_OUT_OF_RESOURCES The memory is not enough.
@retval EFI_INVALID_PARAMETER The config string or the Hii package is invalid.
@@ -1880,7 +1880,7 @@ GetBlockDataInfo (
EFI_STATUS Status;
IFR_BLOCK_DATA *BlockArray;
UINT8 *DataBuffer;
-
+
//
// Initialize the local variables.
//
@@ -1916,7 +1916,7 @@ GetBlockDataInfo (
while (*StringPtr != 0 && StrnCmp (StringPtr, L"&OFFSET=", StrLen (L"&OFFSET=")) == 0) {
//
// Skip the &OFFSET= string
- //
+ //
StringPtr += StrLen (L"&OFFSET=");
//
@@ -2046,13 +2046,13 @@ GetBlockDataInfo (
}
//
- // If '\0', parsing is finished.
+ // If '\0', parsing is finished.
//
if (*StringPtr == 0) {
break;
}
//
- // Go to next ConfigBlock
+ // Go to next ConfigBlock
//
}
@@ -2082,7 +2082,7 @@ Done:
if (DataBuffer != NULL) {
FreePool (DataBuffer);
}
-
+
if (BlockArray != NULL) {
//
// Free Link Array CurrentBlockArray
@@ -2107,7 +2107,7 @@ Done:
@param VarGuid Guid of the buffer storage.
@param VarName Name of the buffer storage.
@param HiiHandle The HiiHandle for this package.
-
+
@retval EFI_SUCCESS The current setting is valid.
@retval EFI_OUT_OF_RESOURCES The memory is not enough.
@retval EFI_INVALID_PARAMETER The config string or the Hii package is invalid.
@@ -2176,7 +2176,7 @@ InternalHiiValidateCurrentSetting (
if (VarBuffer != NULL) {
FreePool (VarBuffer);
}
-
+
if (CurrentBlockArray != NULL) {
//
// Free Link Array CurrentBlockArray
@@ -2201,7 +2201,7 @@ InternalHiiValidateCurrentSetting (
@retval TRUE The input include config request elements.
@retval FALSE The input string not includes.
-
+
**/
BOOLEAN
GetElementsFromRequest (
@@ -2224,15 +2224,15 @@ GetElementsFromRequest (
This function parses the input ConfigRequest string and its matched IFR code
string for setting default value and validating current setting.
- 1. For setting default action, Reset the default value specified by DefaultId
+ 1. For setting default action, Reset the default value specified by DefaultId
to the driver configuration got by Request string.
- 2. For validating current setting, Validate the current configuration
+ 2. For validating current setting, Validate the current configuration
by parsing HII form IFR opcode.
NULL request string support depends on the ExportConfig interface of
HiiConfigRouting protocol in UEFI specification.
-
- @param Request A null-terminated Unicode string in
+
+ @param Request A null-terminated Unicode string in
<MultiConfigRequest> format. It can be NULL.
If it is NULL, all current configuration for the
entirety of the current HII database will be validated.
@@ -2240,7 +2240,7 @@ GetElementsFromRequest (
entirety of the current HII database will be reset.
@param DefaultId Specifies the type of defaults to retrieve only for setting default action.
@param ActionType Action supports setting defaults and validate current setting.
-
+
@retval TRUE Action runs successfully.
@retval FALSE Action is not valid or Action can't be executed successfully..
**/
@@ -2284,7 +2284,7 @@ InternalHiiIfrValueAction (
TempDriverHandle = NULL;
HiiHandle = NULL;
HiiPackageList = NULL;
-
+
//
// Only support set default and validate setting action.
//
@@ -2308,11 +2308,11 @@ InternalHiiIfrValueAction (
&ConfigAltResp
);
}
-
+
if (EFI_ERROR (Status)) {
return FALSE;
}
-
+
StringPtr = ConfigAltResp;
ASSERT (StringPtr != NULL);
@@ -2350,7 +2350,7 @@ InternalHiiIfrValueAction (
if (EFI_ERROR (Status)) {
goto Done;
}
-
+
//
// Get Path value DevicePath
//
@@ -2375,7 +2375,7 @@ InternalHiiIfrValueAction (
if (EFI_ERROR (Status)) {
goto Done;
}
-
+
//
// Find the matched Hii Handle for the found Driver handle
//
@@ -2399,7 +2399,7 @@ InternalHiiIfrValueAction (
//
// This request string has no its Hii package.
// Its default value and validating can't execute by parsing IFR data.
- // Directly jump into the next ConfigAltResp string for another pair Guid, Name, and Path.
+ // Directly jump into the next ConfigAltResp string for another pair Guid, Name, and Path.
//
Status = EFI_SUCCESS;
goto NextConfigAltResp;
@@ -2411,7 +2411,7 @@ InternalHiiIfrValueAction (
PackageListLength = 0;
HiiPackageList = NULL;
Status = gHiiDatabase->ExportPackageLists (gHiiDatabase, HiiHandle, &PackageListLength, HiiPackageList);
-
+
//
// The return status should always be EFI_BUFFER_TOO_SMALL as input buffer's size is 0.
//
@@ -2419,13 +2419,13 @@ InternalHiiIfrValueAction (
Status = EFI_INVALID_PARAMETER;
goto Done;
}
-
+
HiiPackageList = AllocatePool (PackageListLength);
if (HiiPackageList == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Done;
}
-
+
//
// Get PackageList on HiiHandle
//
@@ -2433,7 +2433,7 @@ InternalHiiIfrValueAction (
if (EFI_ERROR (Status)) {
goto Done;
}
-
+
//
// 3. Call ConfigRouting GetAltCfg(ConfigRoute, <ConfigResponse>, Guid, Name, DevicePath, AltCfgId, AltCfgResp)
// Get the default configuration string according to the default ID.
@@ -2447,7 +2447,7 @@ InternalHiiIfrValueAction (
(ActionType == ACTION_SET_DEFAUTL_VALUE) ? &DefaultId:NULL, // it can be NULL to get the current setting.
&ConfigResp
);
-
+
//
// The required setting can't be found. So, it is not required to be validated and set.
//
@@ -2461,7 +2461,7 @@ InternalHiiIfrValueAction (
if (!GetElementsFromRequest (ConfigResp)) {
goto NextConfigAltResp;
}
-
+
//
// 4. Set the default configuration information or Validate current setting by parse IFR code.
// Current Setting is in ConfigResp, will be set into buffer, then check it again.
@@ -2490,7 +2490,7 @@ NextConfigAltResp:
FreePool (HiiPackageList);
HiiPackageList = NULL;
}
-
+
if (ConfigResp != NULL) {
FreePool (ConfigResp);
ConfigResp = NULL;
@@ -2501,10 +2501,10 @@ NextConfigAltResp:
//
FreePool (VarGuid);
VarGuid = NULL;
-
+
FreePool (VarName);
VarName = NULL;
-
+
FreePool (DevicePath);
DevicePath = NULL;
@@ -2521,9 +2521,9 @@ NextConfigAltResp:
if (*StringPtr == L'\0') {
break;
}
-
+
//
- // Construct ConfigAltHdr string "&<ConfigHdr>&ALTCFG=\0"
+ // Construct ConfigAltHdr string "&<ConfigHdr>&ALTCFG=\0"
// | 1 | StrLen (ConfigHdr) | 8 | 1 |
//
MaxLen = 1 + StringPtr - StringHdr + 8 + 1;
@@ -2535,7 +2535,7 @@ NextConfigAltResp:
StrCpyS (ConfigAltHdr, MaxLen, L"&");
StrnCatS (ConfigAltHdr, MaxLen, StringHdr, StringPtr - StringHdr);
StrCatS (ConfigAltHdr, MaxLen, L"&ALTCFG=");
-
+
//
// Skip all AltResp (AltConfigHdr ConfigBody) for the same ConfigHdr
//
@@ -2545,7 +2545,7 @@ NextConfigAltResp:
break;
}
}
-
+
//
// Free the allocated ConfigAltHdr string
//
@@ -2553,7 +2553,7 @@ NextConfigAltResp:
if (*StringPtr == L'\0') {
break;
}
-
+
//
// Find &GUID as the next ConfigHdr
//
@@ -2567,7 +2567,7 @@ NextConfigAltResp:
//
StringPtr ++;
}
-
+
Done:
if (VarGuid != NULL) {
FreePool (VarGuid);
@@ -2588,11 +2588,11 @@ Done:
if (ConfigAltResp != NULL) {
FreePool (ConfigAltResp);
}
-
+
if (HiiPackageList != NULL) {
FreePool (HiiPackageList);
}
-
+
if (EFI_ERROR (Status)) {
return FALSE;
}
@@ -2605,17 +2605,17 @@ Done:
NULL request string support depends on the ExportConfig interface of
HiiConfigRouting protocol in UEFI specification.
-
- @param Request A null-terminated Unicode string in
+
+ @param Request A null-terminated Unicode string in
<MultiConfigRequest> format. It can be NULL.
If it is NULL, all current configuration for the
entirety of the current HII database will be validated.
-
+
@retval TRUE Current configuration is valid.
@retval FALSE Current configuration is invalid.
**/
BOOLEAN
-EFIAPI
+EFIAPI
HiiValidateSettings (
IN CONST EFI_STRING Request OPTIONAL
)
@@ -2625,17 +2625,17 @@ HiiValidateSettings (
/**
Reset the default value specified by DefaultId to the driver
- configuration got by Request string.
+ configuration got by Request string.
NULL request string support depends on the ExportConfig interface of
HiiConfigRouting protocol in UEFI specification.
-
- @param Request A null-terminated Unicode string in
+
+ @param Request A null-terminated Unicode string in
<MultiConfigRequest> format. It can be NULL.
If it is NULL, all configuration for the
entirety of the current HII database will be reset.
@param DefaultId Specifies the type of defaults to retrieve.
-
+
@retval TRUE The default value is set successfully.
@retval FALSE The default value can't be found and set.
**/
@@ -2652,8 +2652,8 @@ HiiSetToDefaults (
/**
Determines if two values in config strings match.
- Compares the substring between StartSearchString and StopSearchString in
- FirstString to the substring between StartSearchString and StopSearchString
+ Compares the substring between StartSearchString and StopSearchString in
+ FirstString to the substring between StartSearchString and StopSearchString
in SecondString. If the two substrings match, then TRUE is returned. If the
two substrings do not match, then FALSE is returned.
@@ -2664,20 +2664,20 @@ HiiSetToDefaults (
@param FirstString Pointer to the first Null-terminated Unicode string.
@param SecondString Pointer to the second Null-terminated Unicode string.
- @param StartSearchString Pointer to the Null-terminated Unicode string that
+ @param StartSearchString Pointer to the Null-terminated Unicode string that
marks the start of the value string to compare.
- @param StopSearchString Pointer to the Null-terminated Unicode string that
+ @param StopSearchString Pointer to the Null-terminated Unicode string that
marks the end of the value string to compare.
- @retval FALSE StartSearchString is not present in FirstString.
+ @retval FALSE StartSearchString is not present in FirstString.
@retval FALSE StartSearchString is not present in SecondString.
- @retval FALSE StopSearchString is not present in FirstString.
+ @retval FALSE StopSearchString is not present in FirstString.
@retval FALSE StopSearchString is not present in SecondString.
- @retval FALSE The length of the substring in FirstString is not the
+ @retval FALSE The length of the substring in FirstString is not the
same length as the substring in SecondString.
- @retval FALSE The value string in FirstString does not matche the
+ @retval FALSE The value string in FirstString does not matche the
value string in SecondString.
- @retval TRUE The value string in FirstString matches the value
+ @retval TRUE The value string in FirstString matches the value
string in SecondString.
**/
@@ -2786,11 +2786,11 @@ HiiIsConfigHdrMatch (
Retrieves uncommitted data from the Form Browser and converts it to a binary
buffer.
- @param[in] VariableGuid Pointer to an EFI_GUID structure. This is an optional
+ @param[in] VariableGuid Pointer to an EFI_GUID structure. This is an optional
parameter that may be NULL.
- @param[in] VariableName Pointer to a Null-terminated Unicode string. This
+ @param[in] VariableName Pointer to a Null-terminated Unicode string. This
is an optional parameter that may be NULL.
- @param[in] BufferSize Length in bytes of buffer to hold retrieved data.
+ @param[in] BufferSize Length in bytes of buffer to hold retrieved data.
@param[out] Buffer Buffer of data to be updated.
@retval FALSE The uncommitted data could not be retrieved.
@@ -2827,7 +2827,7 @@ HiiGetBrowserData (
Size = Size + (StrLen (ResultsData) + 1) * sizeof (CHAR16);
ConfigResp = AllocateZeroPool (Size);
UnicodeSPrint (ConfigResp, Size, L"%s&%s", mConfigHdrTemplate, ResultsData);
-
+
//
// Free the allocated buffer
//
@@ -2872,7 +2872,7 @@ HiiGetBrowserData (
@param[in] RequestElement An optional field to specify which part of the
buffer data will be send back to Browser. If NULL,
the whole buffer of data will be committed to
- Browser.
+ Browser.
<RequestElement> ::= &OFFSET=<Number>&WIDTH=<Number>*
@retval FALSE The uncommitted data could not be updated.
@@ -2901,7 +2901,7 @@ HiiSetBrowserData (
//
if (RequestElement == NULL) {
//
- // Allocate and fill a buffer large enough to hold the <ConfigHdr> template
+ // Allocate and fill a buffer large enough to hold the <ConfigHdr> template
// followed by "&OFFSET=0&WIDTH=WWWWWWWWWWWWWWWW" followed by a Null-terminator
//
Size = (StrLen (mConfigHdrTemplate) + 32 + 1) * sizeof (CHAR16);
@@ -2909,7 +2909,7 @@ HiiSetBrowserData (
UnicodeSPrint (ConfigRequest, Size, L"%s&OFFSET=0&WIDTH=%016LX", mConfigHdrTemplate, (UINT64)BufferSize);
} else {
//
- // Allocate and fill a buffer large enough to hold the <ConfigHdr> template
+ // Allocate and fill a buffer large enough to hold the <ConfigHdr> template
// followed by <RequestElement> followed by a Null-terminator
//
Size = StrLen (mConfigHdrTemplate) * sizeof (CHAR16);
@@ -2968,7 +2968,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 mHiiDefaultTypeToWidth[] = {
};
/**
- Allocates and returns a new OpCode Handle. OpCode Handles must be freed with
+ Allocates and returns a new OpCode Handle. OpCode Handles must be freed with
HiiFreeOpCodeHandle().
@retval NULL There are not enough resources to allocate a new OpCode Handle.
@@ -3026,7 +3026,7 @@ HiiFreeOpCodeHandle (
/**
Internal function gets the current position of opcode buffer.
-
+
@param[in] OpCodeHandle Handle to the buffer of opcodes.
@return Current position of opcode buffer.
@@ -3042,7 +3042,7 @@ InternalHiiOpCodeHandlePosition (
/**
Internal function gets the start pointer of opcode buffer.
-
+
@param[in] OpCodeHandle Handle to the buffer of opcodes.
@return Pointer to the opcode buffer base.
@@ -3059,7 +3059,7 @@ InternalHiiOpCodeHandleBuffer (
/**
Internal function reserves the enough buffer for current opcode.
When the buffer is not enough, Opcode buffer will be extended.
-
+
@param[in] OpCodeHandle Handle to the buffer of opcodes.
@param[in] Size Size of current opcode.
@@ -3080,7 +3080,7 @@ InternalHiiGrowOpCodeHandle (
OpCodeBuffer = (HII_LIB_OPCODE_BUFFER *)OpCodeHandle;
if (OpCodeBuffer->Position + Size > OpCodeBuffer->BufferSize) {
Buffer = ReallocatePool (
- OpCodeBuffer->BufferSize,
+ OpCodeBuffer->BufferSize,
OpCodeBuffer->BufferSize + (Size + HII_LIB_OPCODE_ALLOCATION_SIZE),
OpCodeBuffer->Buffer
);
@@ -3095,7 +3095,7 @@ InternalHiiGrowOpCodeHandle (
/**
Internal function creates opcode based on the template opcode.
-
+
@param[in] OpCodeHandle Handle to the buffer of opcodes.
@param[in] OpCodeTemplate Pointer to the template buffer of opcode.
@param[in] OpCode OpCode IFR value.
@@ -3132,7 +3132,7 @@ InternalHiiCreateOpCodeExtended (
/**
Internal function creates opcode based on the template opcode for the normal opcode.
-
+
@param[in] OpCodeHandle Handle to the buffer of opcodes.
@param[in] OpCodeTemplate Pointer to the template buffer of opcode.
@param[in] OpCode OpCode IFR value.
@@ -3317,14 +3317,14 @@ HiiCreateDefaultOpCode (
@param[in] OpCodeHandle Handle to the buffer of opcodes.
@param[in] Guid Pointer to EFI_GUID of this guided opcode.
- @param[in] GuidOpCode Pointer to an EFI_IFR_GUID opcode. This is an
+ @param[in] GuidOpCode Pointer to an EFI_IFR_GUID opcode. This is an
optional parameter that may be NULL. If this
- parameter is NULL, then the GUID extension
+ parameter is NULL, then the GUID extension
region of the created opcode is filled with zeros.
- If this parameter is not NULL, then the GUID
- extension region of GuidData will be copied to
+ If this parameter is not NULL, then the GUID
+ extension region of GuidData will be copied to
the GUID extension region of the created opcode.
- @param[in] OpCodeSize The size, in bytes, of created opcode. This value
+ @param[in] OpCodeSize The size, in bytes, of created opcode. This value
must be >= sizeof(EFI_IFR_GUID).
@retval NULL There is not enough space left in Buffer to add the opcode.
@@ -3350,7 +3350,7 @@ HiiCreateGuidOpCode (
CopyGuid ((EFI_GUID *)(VOID *)&OpCode.Guid, Guid);
OpCodePointer = (EFI_IFR_GUID *)InternalHiiCreateOpCodeExtended (
- OpCodeHandle,
+ OpCodeHandle,
&OpCode,
EFI_IFR_GUID_OP,
sizeof (OpCode),
@@ -3444,11 +3444,11 @@ HiiCreateSubTitleOpCode (
OpCode.Flags = Flags;
return InternalHiiCreateOpCodeExtended (
- OpCodeHandle,
+ OpCodeHandle,
&OpCode,
- EFI_IFR_SUBTITLE_OP,
- sizeof (OpCode),
- 0,
+ EFI_IFR_SUBTITLE_OP,
+ sizeof (OpCode),
+ 0,
Scope
);
}
@@ -3498,7 +3498,7 @@ HiiCreateGotoOpCode (
/**
Create EFI_IFR_REF_OP, EFI_IFR_REF2_OP, EFI_IFR_REF3_OP and EFI_IFR_REF4_OP opcode.
- When RefDevicePath is not zero, EFI_IFR_REF4 opcode will be created.
+ When RefDevicePath is not zero, EFI_IFR_REF4 opcode will be created.
When RefDevicePath is zero and RefFormSetId is not NULL, EFI_IFR_REF3 opcode will be created.
When RefDevicePath is zero, RefFormSetId is NULL and RefQuestionId is not zero, EFI_IFR_REF2 opcode will be created.
When RefDevicePath is zero, RefFormSetId is NULL and RefQuestionId is zero, EFI_IFR_REF opcode will be created.
@@ -3512,11 +3512,11 @@ HiiCreateGotoOpCode (
@param[in] Help The string ID for Help.
@param[in] QuestionFlags The flags in Question Header
@param[in] QuestionId Question ID.
- @param[in] RefQuestionId The question on the form to which this link is referring.
+ @param[in] RefQuestionId The question on the form to which this link is referring.
If its value is zero, then the link refers to the top of the form.
- @param[in] RefFormSetId The form set to which this link is referring. If its value is NULL, and RefDevicePath is
+ @param[in] RefFormSetId The form set to which this link is referring. If its value is NULL, and RefDevicePath is
zero, then the link is to the current form set.
- @param[in] RefDevicePath The string identifier that specifies the string containing the text representation of
+ @param[in] RefDevicePath The string identifier that specifies the string containing the text representation of
the device path to which the form set containing the form specified by FormId.
If its value is zero, then the link refers to the current page.
@@ -4110,7 +4110,7 @@ HiiCreateTimeOpCode (
@param[in] FormSetGuid The optional Formset GUID.
@param[in] FormId The Form ID.
@param[in] Package The package header.
- @param[in] OpCodeBufferStart An OpCode buffer that contains the set of IFR
+ @param[in] OpCodeBufferStart An OpCode buffer that contains the set of IFR
opcodes to be inserted or replaced in the form.
@param[in] OpCodeBufferEnd An OpCcode buffer that contains the IFR opcode
that marks the end of a replace operation in the form.
@@ -4157,7 +4157,7 @@ InternalHiiUpdateFormPackageData (
CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length);
BufferPos += IfrOpHdr->Length;
UpdatePackageLength += IfrOpHdr->Length;
-
+
//
// Find the matched FormSet and Form
//
@@ -4174,7 +4174,7 @@ InternalHiiUpdateFormPackageData (
GetForm = FALSE;
}
}
-
+
//
// The matched Form is found, and Update data in this form
//
@@ -4203,7 +4203,7 @@ InternalHiiUpdateFormPackageData (
Offset += IfrOpHdr->Length;
IfrOpHdr = (EFI_IFR_OP_HEADER *) ((UINT8 *) (IfrOpHdr) + IfrOpHdr->Length);
}
-
+
if (Offset >= PackageHeader.Length) {
//
// The end opcode is not found.
@@ -4250,7 +4250,7 @@ InternalHiiUpdateFormPackageData (
Offset += IfrOpHdr->Length;
IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
}
-
+
if (!Updated) {
//
// The updated opcode buffer is not found.
@@ -4267,26 +4267,26 @@ InternalHiiUpdateFormPackageData (
}
/**
- This function updates a form that has previously been registered with the HII
+ This function updates a form that has previously been registered with the HII
Database. This function will perform at most one update operation.
-
- The form to update is specified by Handle, FormSetGuid, and FormId. Binary
- comparisons of IFR opcodes are performed from the beginning of the form being
- updated until an IFR opcode is found that exactly matches the first IFR opcode
+
+ The form to update is specified by Handle, FormSetGuid, and FormId. Binary
+ comparisons of IFR opcodes are performed from the beginning of the form being
+ updated until an IFR opcode is found that exactly matches the first IFR opcode
specified by StartOpCodeHandle. The following rules are used to determine if
an insert, replace, or delete operation is performed.
-
- 1) If no matches are found, then NULL is returned.
+
+ 1) If no matches are found, then NULL is returned.
2) If a match is found, and EndOpCodeHandle is NULL, then all of the IFR opcodes
- from StartOpCodeHandle except the first opcode are inserted immediately after
+ from StartOpCodeHandle except the first opcode are inserted immediately after
the matching IFR opcode in the form to be updated.
- 3) If a match is found, and EndOpCodeHandle is not NULL, then a search is made
- from the matching IFR opcode until an IFR opcode exactly matches the first
+ 3) If a match is found, and EndOpCodeHandle is not NULL, then a search is made
+ from the matching IFR opcode until an IFR opcode exactly matches the first
IFR opcode specified by EndOpCodeHandle. If no match is found for the first
IFR opcode specified by EndOpCodeHandle, then NULL is returned. If a match
- is found, then all of the IFR opcodes between the start match and the end
+ is found, then all of the IFR opcodes between the start match and the end
match are deleted from the form being updated and all of the IFR opcodes
- from StartOpCodeHandle except the first opcode are inserted immediately after
+ from StartOpCodeHandle except the first opcode are inserted immediately after
the matching start IFR opcode. If StartOpCcodeHandle only contains one
IFR instruction, then the result of this operation will delete all of the IFR
opcodes between the start end matches.
@@ -4299,26 +4299,26 @@ InternalHiiUpdateFormPackageData (
is an optional parameter that may be NULL.
If it is NULL, all FormSet will be updated.
@param[in] FormId The ID of the form to update.
- @param[in] StartOpCodeHandle An OpCode Handle that contains the set of IFR
+ @param[in] StartOpCodeHandle An OpCode Handle that contains the set of IFR
opcodes to be inserted or replaced in the form.
- The first IFR instruction in StartOpCodeHandle
- is used to find matching IFR opcode in the
- form.
+ The first IFR instruction in StartOpCodeHandle
+ is used to find matching IFR opcode in the
+ form.
@param[in] EndOpCodeHandle An OpCcode Handle that contains the IFR opcode
that marks the end of a replace operation in
the form. This is an optional parameter that
may be NULL. If it is NULL, then an the IFR
- opcodes specified by StartOpCodeHandle are
+ opcodes specified by StartOpCodeHandle are
inserted into the form.
-
+
@retval EFI_OUT_OF_RESOURCES No enough memory resource is allocated.
@retval EFI_NOT_FOUND The following cases will return EFI_NOT_FOUND.
- 1) The form specified by HiiHandle, FormSetGuid,
+ 1) The form specified by HiiHandle, FormSetGuid,
and FormId could not be found in the HII Database.
2) No IFR opcodes in the target form match the first
IFR opcode in StartOpCodeHandle.
- 3) EndOpCOde is not NULL, and no IFR opcodes in the
- target form following a matching start opcode match
+ 3) EndOpCOde is not NULL, and no IFR opcodes in the
+ target form following a matching start opcode match
the first IFR opcode in EndOpCodeHandle.
@retval EFI_SUCCESS The matched form is updated by StartOpcode.
@@ -4326,7 +4326,7 @@ InternalHiiUpdateFormPackageData (
EFI_STATUS
EFIAPI
HiiUpdateForm (
- IN EFI_HII_HANDLE HiiHandle,
+ IN EFI_HII_HANDLE HiiHandle,
IN EFI_GUID *FormSetGuid, OPTIONAL
IN EFI_FORM_ID FormId,
IN VOID *StartOpCodeHandle,
@@ -4335,7 +4335,7 @@ HiiUpdateForm (
{
EFI_STATUS Status;
EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList;
- UINT32 PackageListLength;
+ UINT32 PackageListLength;
UINT32 Offset;
EFI_HII_PACKAGE_LIST_HEADER *UpdatePackageList;
UINTN BufferSize;
@@ -4346,7 +4346,7 @@ HiiUpdateForm (
BOOLEAN Updated;
HII_LIB_OPCODE_BUFFER *OpCodeBufferStart;
HII_LIB_OPCODE_BUFFER *OpCodeBufferEnd;
-
+
//
// Input update data can't be NULL.
//
@@ -4355,13 +4355,13 @@ HiiUpdateForm (
UpdatePackageList = NULL;
TempPackage = NULL;
HiiPackageList = NULL;
-
+
//
// Retrieve buffer data from Opcode Handle
//
OpCodeBufferStart = (HII_LIB_OPCODE_BUFFER *) StartOpCodeHandle;
OpCodeBufferEnd = (HII_LIB_OPCODE_BUFFER *) EndOpCodeHandle;
-
+
//
// Get the original package list
//
@@ -4395,7 +4395,7 @@ HiiUpdateForm (
Status = EFI_OUT_OF_RESOURCES;
goto Finish;
}
-
+
//
// Allocate temp buffer to store the temp updated package buffer
//
@@ -4412,7 +4412,7 @@ HiiUpdateForm (
//
CopyMem (UpdateBufferPos, HiiPackageList, sizeof (EFI_HII_PACKAGE_LIST_HEADER));
UpdateBufferPos += sizeof (EFI_HII_PACKAGE_LIST_HEADER);
-
+
//
// Go through each package to find the matched package and update one by one
//
@@ -4435,7 +4435,7 @@ HiiUpdateForm (
if (!EFI_ERROR(Status)) {
//
// Set Update Flag
- //
+ //
Updated = TRUE;
//
// Add updated package buffer
@@ -4451,14 +4451,14 @@ HiiUpdateForm (
CopyMem (UpdateBufferPos, Package, PackageHeader.Length);
UpdateBufferPos += PackageHeader.Length;
}
-
+
if (Updated) {
//
// Update package list length
//
BufferSize = UpdateBufferPos - (UINT8 *) UpdatePackageList;
WriteUnaligned32 (&UpdatePackageList->PackageLength, (UINT32) BufferSize);
-
+
//
// Update Package to show form
//
@@ -4474,14 +4474,14 @@ Finish:
if (HiiPackageList != NULL) {
FreePool (HiiPackageList);
}
-
+
if (UpdatePackageList != NULL) {
FreePool (UpdatePackageList);
}
-
+
if (TempPackage != NULL) {
FreePool (TempPackage);
}
- return Status;
+ return Status;
}
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiString.c b/MdeModulePkg/Library/UefiHiiLib/HiiString.c
index c6a241e657..ae787fec59 100644
--- a/MdeModulePkg/Library/UefiHiiLib/HiiString.c
+++ b/MdeModulePkg/Library/UefiHiiLib/HiiString.c
@@ -1,7 +1,7 @@
/** @file
HII Library implementation that uses DXE protocols and services.
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 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
@@ -16,37 +16,37 @@
#include "InternalHiiLib.h"
/**
- This function create a new string in String Package or updates an existing
+ This function create a new string in String Package or updates an existing
string in a String Package. If StringId is 0, then a new string is added to
a String Package. If StringId is not zero, then a string in String Package is
updated. If SupportedLanguages is NULL, then the string is added or updated
for all the languages that the String Package supports. If SupportedLanguages
- is not NULL, then the string is added or updated for the set of languages
+ is not NULL, then the string is added or updated for the set of languages
specified by SupportedLanguages.
-
+
If HiiHandle is NULL, then ASSERT().
If String is NULL, then ASSERT().
- @param[in] HiiHandle A handle that was previously registered in the
+ @param[in] HiiHandle A handle that was previously registered in the
HII Database.
- @param[in] StringId If zero, then a new string is created in the
- String Package associated with HiiHandle. If
- non-zero, then the string specified by StringId
- is updated in the String Package associated
- with HiiHandle.
- @param[in] String A pointer to the Null-terminated Unicode string
- to add or update in the String Package associated
+ @param[in] StringId If zero, then a new string is created in the
+ String Package associated with HiiHandle. If
+ non-zero, then the string specified by StringId
+ is updated in the String Package associated
+ with HiiHandle.
+ @param[in] String A pointer to the Null-terminated Unicode string
+ to add or update in the String Package associated
with HiiHandle.
- @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string of
- language codes. If this parameter is NULL, then
- String is added or updated in the String Package
- associated with HiiHandle for all the languages
- that the String Package supports. If this
- parameter is not NULL, then then String is added
- or updated in the String Package associated with
- HiiHandle for the set oflanguages specified by
- SupportedLanguages. The format of
- SupportedLanguages must follow the language
+ @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string of
+ language codes. If this parameter is NULL, then
+ String is added or updated in the String Package
+ associated with HiiHandle for all the languages
+ that the String Package supports. If this
+ parameter is not NULL, then then String is added
+ or updated in the String Package associated with
+ HiiHandle for the set oflanguages specified by
+ SupportedLanguages. The format of
+ SupportedLanguages must follow the language
format assumed the HII Database.
@retval 0 The string could not be added or updated in the String Package.
@@ -106,7 +106,7 @@ HiiSetString (
if (*Supported != 0) {
*(Supported++) = '\0';
}
-
+
if ((SupportedLanguages == NULL) && AsciiStrnCmp (Language, UEFI_CONFIG_LANG, AsciiStrLen (UEFI_CONFIG_LANG)) == 0) {
//
// Skip string package used for keyword protocol.
@@ -145,24 +145,24 @@ HiiSetString (
/**
- Retrieves a string from a string package names by GUID in a specific language.
- If the language is not specified, then a string from a string package in the
- current platform language is retrieved. If the string can not be retrieved
- using the specified language or the current platform language, then the string
- is retrieved from the string package in the first language the string package
- supports. The returned string is allocated using AllocatePool(). The caller
+ Retrieves a string from a string package names by GUID in a specific language.
+ If the language is not specified, then a string from a string package in the
+ current platform language is retrieved. If the string can not be retrieved
+ using the specified language or the current platform language, then the string
+ is retrieved from the string package in the first language the string package
+ supports. The returned string is allocated using AllocatePool(). The caller
is responsible for freeing the allocated buffer using FreePool().
-
+
If PackageListGuid is NULL, then ASSERT().
If StringId is 0, then ASSERT.
- @param[in] PackageListGuid The GUID of a package list that was previously
+ @param[in] PackageListGuid The GUID of a package list that was previously
registered in the HII Database.
- @param[in] StringId The identifier of the string to retrieved from the
+ @param[in] StringId The identifier of the string to retrieved from the
string package associated with PackageListGuid.
- @param[in] Language The language of the string to retrieve. If this
- parameter is NULL, then the current platform
- language is used. The format of Language must
+ @param[in] Language The language of the string to retrieve. If this
+ parameter is NULL, then the current platform
+ language is used. The format of Language must
follow the language format assumed the HII Database.
@retval NULL The package list specified by PackageListGuid is not present in the
@@ -197,22 +197,22 @@ HiiGetPackageString (
/**
Retrieves a string from a string package in a specific language. If the language
- is not specified, then a string from a string package in the current platform
- language is retrieved. If the string can not be retrieved using the specified
- language or the current platform language, then the string is retrieved from
- the string package in the first language the string package supports. The
- returned string is allocated using AllocatePool(). The caller is responsible
+ is not specified, then a string from a string package in the current platform
+ language is retrieved. If the string can not be retrieved using the specified
+ language or the current platform language, then the string is retrieved from
+ the string package in the first language the string package supports. The
+ returned string is allocated using AllocatePool(). The caller is responsible
for freeing the allocated buffer using FreePool().
-
+
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.
- @param[in] Language The language of the string to retrieve. If this parameter
- is NULL, then the current platform language is used. The
- format of Language must follow the language format assumed
+ @param[in] Language The language of the string to retrieve. If this parameter
+ is NULL, then the current platform language is used. The
+ format of Language must follow the language format assumed
the HII Database.
@retval NULL The string specified by StringId is not present in the string package.
@@ -240,7 +240,7 @@ HiiGetString (
//
// Initialize all allocated buffers to NULL
- //
+ //
SupportedLanguages = NULL;
PlatformLanguage = NULL;
BestLanguage = NULL;
@@ -260,7 +260,7 @@ HiiGetString (
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatformLanguage, NULL);
//
- // If Languag is NULL, then set it to an empty string, so it will be
+ // If Languag is NULL, then set it to an empty string, so it will be
// skipped by GetBestLanguage()
//
if (Language == NULL) {
@@ -271,11 +271,11 @@ HiiGetString (
// 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) {
@@ -296,8 +296,8 @@ HiiGetString (
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
//
diff --git a/MdeModulePkg/Library/UefiHiiLib/InternalHiiLib.h b/MdeModulePkg/Library/UefiHiiLib/InternalHiiLib.h
index 293c22666d..04fe909a33 100644
--- a/MdeModulePkg/Library/UefiHiiLib/InternalHiiLib.h
+++ b/MdeModulePkg/Library/UefiHiiLib/InternalHiiLib.h
@@ -1,14 +1,14 @@
/** @file
Internal include file for the HII Library instance.
- Copyright (c) 2007 - 2017, 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.
+ 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/Library/UefiHiiLib/UefiHiiLib.uni b/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.uni
index 760617f705..1bf2a7ee53 100644
--- a/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.uni
+++ b/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.uni
@@ -3,13 +3,13 @@
//
// HII Library implementation using UEFI HII protocols and services.
//
-// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2006 - 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.
//