summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/UefiLib/UefiLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/UefiLib/UefiLib.c')
-rw-r--r--MdePkg/Library/UefiLib/UefiLib.c92
1 files changed, 0 insertions, 92 deletions
diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c
index 07c45d1e91..835218f982 100644
--- a/MdePkg/Library/UefiLib/UefiLib.c
+++ b/MdePkg/Library/UefiLib/UefiLib.c
@@ -1285,98 +1285,6 @@ FreeUnicodeStringTable (
return EFI_SUCCESS;
}
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function will be deprecated for security reason.
-
- Returns a pointer to an allocated buffer that contains the contents of a
- variable retrieved through the UEFI Runtime Service GetVariable(). The
- returned buffer is allocated using AllocatePool(). The caller is responsible
- for freeing this buffer with FreePool().
-
- If Name is NULL, then ASSERT().
- If Guid is NULL, then ASSERT().
-
- @param[in] Name The pointer to a Null-terminated Unicode string.
- @param[in] Guid The pointer to an EFI_GUID structure
-
- @retval NULL The variable could not be retrieved.
- @retval NULL There are not enough resources available for the variable contents.
- @retval Other A pointer to allocated buffer containing the variable contents.
-
-**/
-VOID *
-EFIAPI
-GetVariable (
- IN CONST CHAR16 *Name,
- IN CONST EFI_GUID *Guid
- )
-{
- EFI_STATUS Status;
- UINTN Size;
- VOID *Value;
-
- ASSERT (Name != NULL);
- ASSERT (Guid != NULL);
-
- //
- // Try to get the variable size.
- //
- Value = NULL;
- Size = 0;
- Status = gRT->GetVariable ((CHAR16 *) Name, (EFI_GUID *) Guid, NULL, &Size, Value);
- if (Status != EFI_BUFFER_TOO_SMALL) {
- return NULL;
- }
-
- //
- // Allocate buffer to get the variable.
- //
- Value = AllocatePool (Size);
- if (Value == NULL) {
- return NULL;
- }
-
- //
- // Get the variable data.
- //
- Status = gRT->GetVariable ((CHAR16 *) Name, (EFI_GUID *) Guid, NULL, &Size, Value);
- if (EFI_ERROR (Status)) {
- FreePool(Value);
- return NULL;
- }
-
- return Value;
-}
-
-/**
- [ATTENTION] This function will be deprecated for security reason.
-
- Returns a pointer to an allocated buffer that contains the contents of a
- variable retrieved through the UEFI Runtime Service GetVariable(). This
- function always uses the EFI_GLOBAL_VARIABLE GUID to retrieve variables.
- The returned buffer is allocated using AllocatePool(). The caller is
- responsible for freeing this buffer with FreePool().
-
- If Name is NULL, then ASSERT().
-
- @param[in] Name The pointer to a Null-terminated Unicode string.
-
- @retval NULL The variable could not be retrieved.
- @retval NULL There are not enough resources available for the variable contents.
- @retval Other A pointer to allocated buffer containing the variable contents.
-
-**/
-VOID *
-EFIAPI
-GetEfiGlobalVariable (
- IN CONST CHAR16 *Name
- )
-{
- return GetVariable (Name, &gEfiGlobalVariableGuid);
-}
-#endif
/**
Returns the status whether get the variable success. The function retrieves