mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
Clean up IfrSupportLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5487 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
cfb9b643f7
commit
1db1f6adb4
@ -431,6 +431,7 @@ CreateStringOpCode (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
EFIAPI
|
||||||
ToLower (
|
ToLower (
|
||||||
IN OUT CHAR16 *Str
|
IN OUT CHAR16 *Str
|
||||||
)
|
)
|
||||||
@ -494,7 +495,9 @@ HexStringToBuffer (
|
|||||||
@retval EFI_SUCCESS Routine success.
|
@retval EFI_SUCCESS Routine success.
|
||||||
@retval EFI_BUFFER_TOO_SMALL The string buffer is too small.
|
@retval EFI_BUFFER_TOO_SMALL The string buffer is too small.
|
||||||
|
|
||||||
**/EFI_STATUS
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
ConfigStringToUnicode (
|
ConfigStringToUnicode (
|
||||||
IN OUT CHAR16 *UnicodeString,
|
IN OUT CHAR16 *UnicodeString,
|
||||||
IN OUT UINTN *StrBufferLen,
|
IN OUT UINTN *StrBufferLen,
|
||||||
@ -518,7 +521,9 @@ ConfigStringToUnicode (
|
|||||||
@retval EFI_SUCCESS Routine success.
|
@retval EFI_SUCCESS Routine success.
|
||||||
@retval EFI_BUFFER_TOO_SMALL The string buffer is too small.
|
@retval EFI_BUFFER_TOO_SMALL The string buffer is too small.
|
||||||
|
|
||||||
**/EFI_STATUS
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
UnicodeToConfigString (
|
UnicodeToConfigString (
|
||||||
IN OUT CHAR16 *ConfigString,
|
IN OUT CHAR16 *ConfigString,
|
||||||
IN OUT UINTN *StrBufferLen,
|
IN OUT UINTN *StrBufferLen,
|
||||||
@ -640,7 +645,7 @@ SetBrowserData (
|
|||||||
@param NumberOfLines The number of lines for the dialog box
|
@param NumberOfLines The number of lines for the dialog box
|
||||||
@param KeyValue The EFI_KEY value returned if HotKey is TRUE..
|
@param KeyValue The EFI_KEY value returned if HotKey is TRUE..
|
||||||
@param String Pointer to the first string in the list
|
@param String Pointer to the first string in the list
|
||||||
@param ... A series of (quantity == NumberOfLines) text
|
@param ... A series of (quantity == NumberOfLines - 1) text
|
||||||
strings which will be used to construct the dialog
|
strings which will be used to construct the dialog
|
||||||
box
|
box
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ EFI_HII_PACKAGE_LIST_HEADER *
|
|||||||
InternalHiiLibPreparePackages (
|
InternalHiiLibPreparePackages (
|
||||||
IN UINTN NumberOfPackages,
|
IN UINTN NumberOfPackages,
|
||||||
IN CONST EFI_GUID *GuidId,
|
IN CONST EFI_GUID *GuidId,
|
||||||
VA_LIST Marker
|
IN VA_LIST Marker
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_HII_PACKAGE_LIST_HEADER *PackageListHeader;
|
EFI_HII_PACKAGE_LIST_HEADER *PackageListHeader;
|
||||||
|
@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
//
|
//
|
||||||
// Fake <ConfigHdr>
|
// Fake <ConfigHdr>
|
||||||
//
|
//
|
||||||
UINT16 mFakeConfigHdr[] = L"GUID=00000000000000000000000000000000&NAME=0000&PATH=0";
|
GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT16 mFakeConfigHdr[] = L"GUID=00000000000000000000000000000000&NAME=0000&PATH=0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Draw a dialog and return the selected key.
|
Draw a dialog and return the selected key.
|
||||||
@ -26,7 +26,7 @@ UINT16 mFakeConfigHdr[] = L"GUID=00000000000000000000000000000000&NAME=0000&PATH
|
|||||||
@param NumberOfLines The number of lines for the dialog box
|
@param NumberOfLines The number of lines for the dialog box
|
||||||
@param KeyValue The EFI_KEY value returned if HotKey is TRUE..
|
@param KeyValue The EFI_KEY value returned if HotKey is TRUE..
|
||||||
@param String Pointer to the first string in the list
|
@param String Pointer to the first string in the list
|
||||||
@param ... A series of (quantity == NumberOfLines) text
|
@param ... A series of (quantity == NumberOfLines - 1) text
|
||||||
strings which will be used to construct the dialog
|
strings which will be used to construct the dialog
|
||||||
box
|
box
|
||||||
|
|
||||||
@ -109,6 +109,7 @@ IfrLibCreatePopUp (
|
|||||||
LargestString = StringLen;
|
LargestString = StringLen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
VA_END (Marker);
|
||||||
|
|
||||||
if ((LargestString + 2) > DimensionsWidth) {
|
if ((LargestString + 2) > DimensionsWidth) {
|
||||||
LargestString = DimensionsWidth - 2;
|
LargestString = DimensionsWidth - 2;
|
||||||
@ -250,6 +251,7 @@ SwapBuffer (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
EFIAPI
|
||||||
ToLower (
|
ToLower (
|
||||||
IN OUT CHAR16 *Str
|
IN OUT CHAR16 *Str
|
||||||
)
|
)
|
||||||
@ -292,7 +294,7 @@ BufferToHexString (
|
|||||||
StrBufferLen = BufferSize * sizeof (CHAR16) + 1;
|
StrBufferLen = BufferSize * sizeof (CHAR16) + 1;
|
||||||
Status = BufToHexString (Str, &StrBufferLen, NewBuffer, BufferSize);
|
Status = BufToHexString (Str, &StrBufferLen, NewBuffer, BufferSize);
|
||||||
|
|
||||||
gBS->FreePool (NewBuffer);
|
FreePool (NewBuffer);
|
||||||
//
|
//
|
||||||
// Convert the uppercase to lowercase since <HexAf> is defined in lowercase format.
|
// Convert the uppercase to lowercase since <HexAf> is defined in lowercase format.
|
||||||
//
|
//
|
||||||
@ -354,6 +356,7 @@ HexStringToBuffer (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
ConfigStringToUnicode (
|
ConfigStringToUnicode (
|
||||||
IN OUT CHAR16 *UnicodeString,
|
IN OUT CHAR16 *UnicodeString,
|
||||||
IN OUT UINTN *StrBufferLen,
|
IN OUT UINTN *StrBufferLen,
|
||||||
@ -413,6 +416,7 @@ ConfigStringToUnicode (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
UnicodeToConfigString (
|
UnicodeToConfigString (
|
||||||
IN OUT CHAR16 *ConfigString,
|
IN OUT CHAR16 *ConfigString,
|
||||||
IN OUT UINTN *StrBufferLen,
|
IN OUT UINTN *StrBufferLen,
|
||||||
@ -566,6 +570,7 @@ ConstructConfigHdr (
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
|
EFIAPI
|
||||||
FindBlockName (
|
FindBlockName (
|
||||||
IN OUT CHAR16 *String,
|
IN OUT CHAR16 *String,
|
||||||
UINTN Offset,
|
UINTN Offset,
|
||||||
@ -644,7 +649,7 @@ GetBrowserData (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CHAR16 *ConfigHdr;
|
CONST CHAR16 *ConfigHdr;
|
||||||
CHAR16 *ConfigResp;
|
CHAR16 *ConfigResp;
|
||||||
CHAR16 *StringPtr;
|
CHAR16 *StringPtr;
|
||||||
UINTN HeaderLen;
|
UINTN HeaderLen;
|
||||||
@ -688,7 +693,7 @@ GetBrowserData (
|
|||||||
VariableName
|
VariableName
|
||||||
);
|
);
|
||||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||||
gBS->FreePool (ConfigResp);
|
FreePool (ConfigResp);
|
||||||
ConfigResp = AllocateZeroPool (BufferLen + HeaderLen);
|
ConfigResp = AllocateZeroPool (BufferLen + HeaderLen);
|
||||||
|
|
||||||
StringPtr = ConfigResp + HeaderLen;
|
StringPtr = ConfigResp + HeaderLen;
|
||||||
@ -705,7 +710,7 @@ GetBrowserData (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
gBS->FreePool (ConfigResp);
|
FreePool (ConfigResp);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
CopyMem (ConfigResp, ConfigHdr, HeaderLen * sizeof (UINT16));
|
CopyMem (ConfigResp, ConfigHdr, HeaderLen * sizeof (UINT16));
|
||||||
@ -720,7 +725,7 @@ GetBrowserData (
|
|||||||
BufferSize,
|
BufferSize,
|
||||||
&Progress
|
&Progress
|
||||||
);
|
);
|
||||||
gBS->FreePool (ConfigResp);
|
FreePool (ConfigResp);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
@ -756,7 +761,7 @@ SetBrowserData (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CHAR16 *ConfigHdr;
|
CONST CHAR16 *ConfigHdr;
|
||||||
CHAR16 *ConfigResp;
|
CHAR16 *ConfigResp;
|
||||||
CHAR16 *StringPtr;
|
CHAR16 *StringPtr;
|
||||||
UINTN HeaderLen;
|
UINTN HeaderLen;
|
||||||
@ -825,7 +830,7 @@ SetBrowserData (
|
|||||||
&Progress
|
&Progress
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
gBS->FreePool (ConfigResp);
|
FreePool (ConfigResp);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -845,6 +850,6 @@ SetBrowserData (
|
|||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
gBS->FreePool (ConfigResp);
|
FreePool (ConfigResp);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user