diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-16 03:06:59 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-16 03:06:59 +0000 |
commit | 1db1f6adb4591671c044dc18d82f89845c60ecfa (patch) | |
tree | 915926e5db3b9e9177b0e68ea3b3bb17a66d3e4e | |
parent | cfb9b643f74f52183ef1022aaf24534b0ea78e47 (diff) | |
download | edk2-1db1f6adb4591671c044dc18d82f89845c60ecfa.zip edk2-1db1f6adb4591671c044dc18d82f89845c60ecfa.tar.gz edk2-1db1f6adb4591671c044dc18d82f89845c60ecfa.tar.bz2 |
Clean up IfrSupportLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5487 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdePkg/Include/Library/IfrSupportLib.h | 11 | ||||
-rw-r--r-- | MdePkg/Library/HiiLib/HiiLib.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/IfrSupportLib/UefiIfrForm.c | 25 |
3 files changed, 24 insertions, 14 deletions
diff --git a/MdePkg/Include/Library/IfrSupportLib.h b/MdePkg/Include/Library/IfrSupportLib.h index f4f7a19..953cd47 100644 --- a/MdePkg/Include/Library/IfrSupportLib.h +++ b/MdePkg/Include/Library/IfrSupportLib.h @@ -431,6 +431,7 @@ CreateStringOpCode ( **/ VOID +EFIAPI ToLower ( IN OUT CHAR16 *Str ) @@ -494,7 +495,9 @@ HexStringToBuffer ( @retval EFI_SUCCESS Routine success. @retval EFI_BUFFER_TOO_SMALL The string buffer is too small. -**/EFI_STATUS +**/ +EFI_STATUS +EFIAPI ConfigStringToUnicode ( IN OUT CHAR16 *UnicodeString, IN OUT UINTN *StrBufferLen, @@ -518,7 +521,9 @@ ConfigStringToUnicode ( @retval EFI_SUCCESS Routine success. @retval EFI_BUFFER_TOO_SMALL The string buffer is too small. -**/EFI_STATUS +**/ +EFI_STATUS +EFIAPI UnicodeToConfigString ( IN OUT CHAR16 *ConfigString, IN OUT UINTN *StrBufferLen, @@ -640,7 +645,7 @@ SetBrowserData ( @param NumberOfLines The number of lines for the dialog box @param KeyValue The EFI_KEY value returned if HotKey is TRUE.. @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 box diff --git a/MdePkg/Library/HiiLib/HiiLib.c b/MdePkg/Library/HiiLib/HiiLib.c index a178012..be3a317 100644 --- a/MdePkg/Library/HiiLib/HiiLib.c +++ b/MdePkg/Library/HiiLib/HiiLib.c @@ -78,7 +78,7 @@ EFI_HII_PACKAGE_LIST_HEADER * InternalHiiLibPreparePackages (
IN UINTN NumberOfPackages,
IN CONST EFI_GUID *GuidId,
- VA_LIST Marker
+ IN VA_LIST Marker
)
{
EFI_HII_PACKAGE_LIST_HEADER *PackageListHeader;
diff --git a/MdePkg/Library/IfrSupportLib/UefiIfrForm.c b/MdePkg/Library/IfrSupportLib/UefiIfrForm.c index d0da744..179fc1c 100644 --- a/MdePkg/Library/IfrSupportLib/UefiIfrForm.c +++ b/MdePkg/Library/IfrSupportLib/UefiIfrForm.c @@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // 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. @@ -26,7 +26,7 @@ UINT16 mFakeConfigHdr[] = L"GUID=00000000000000000000000000000000&NAME=0000&PATH @param NumberOfLines The number of lines for the dialog box @param KeyValue The EFI_KEY value returned if HotKey is TRUE.. @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 box @@ -109,6 +109,7 @@ IfrLibCreatePopUp ( LargestString = StringLen; } } + VA_END (Marker); if ((LargestString + 2) > DimensionsWidth) { LargestString = DimensionsWidth - 2; @@ -250,6 +251,7 @@ SwapBuffer ( **/ VOID +EFIAPI ToLower ( IN OUT CHAR16 *Str ) @@ -292,7 +294,7 @@ BufferToHexString ( StrBufferLen = BufferSize * sizeof (CHAR16) + 1; Status = BufToHexString (Str, &StrBufferLen, NewBuffer, BufferSize); - gBS->FreePool (NewBuffer); + FreePool (NewBuffer); // // Convert the uppercase to lowercase since <HexAf> is defined in lowercase format. // @@ -354,6 +356,7 @@ HexStringToBuffer ( **/ EFI_STATUS +EFIAPI ConfigStringToUnicode ( IN OUT CHAR16 *UnicodeString, IN OUT UINTN *StrBufferLen, @@ -413,6 +416,7 @@ ConfigStringToUnicode ( **/ EFI_STATUS +EFIAPI UnicodeToConfigString ( IN OUT CHAR16 *ConfigString, IN OUT UINTN *StrBufferLen, @@ -566,6 +570,7 @@ ConstructConfigHdr ( **/ BOOLEAN +EFIAPI FindBlockName ( IN OUT CHAR16 *String, UINTN Offset, @@ -644,7 +649,7 @@ GetBrowserData ( ) { EFI_STATUS Status; - CHAR16 *ConfigHdr; + CONST CHAR16 *ConfigHdr; CHAR16 *ConfigResp; CHAR16 *StringPtr; UINTN HeaderLen; @@ -688,7 +693,7 @@ GetBrowserData ( VariableName ); if (Status == EFI_BUFFER_TOO_SMALL) { - gBS->FreePool (ConfigResp); + FreePool (ConfigResp); ConfigResp = AllocateZeroPool (BufferLen + HeaderLen); StringPtr = ConfigResp + HeaderLen; @@ -705,7 +710,7 @@ GetBrowserData ( ); } if (EFI_ERROR (Status)) { - gBS->FreePool (ConfigResp); + FreePool (ConfigResp); return Status; } CopyMem (ConfigResp, ConfigHdr, HeaderLen * sizeof (UINT16)); @@ -720,7 +725,7 @@ GetBrowserData ( BufferSize, &Progress ); - gBS->FreePool (ConfigResp); + FreePool (ConfigResp); return Status; } @@ -756,7 +761,7 @@ SetBrowserData ( ) { EFI_STATUS Status; - CHAR16 *ConfigHdr; + CONST CHAR16 *ConfigHdr; CHAR16 *ConfigResp; CHAR16 *StringPtr; UINTN HeaderLen; @@ -825,7 +830,7 @@ SetBrowserData ( &Progress ); if (EFI_ERROR (Status)) { - gBS->FreePool (ConfigResp); + FreePool (ConfigResp); return Status; } @@ -845,6 +850,6 @@ SetBrowserData ( NULL, NULL ); - gBS->FreePool (ConfigResp); + FreePool (ConfigResp); return Status; } |