diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c index a072c31e60..4060f4711d 100644 --- a/MdeModulePkg/Universal/Variable/Pei/Variable.c +++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c @@ -947,9 +947,10 @@ FindVariable ( @param DataSize On entry, points to the size in bytes of the Data buffer. On return, points to the size of the data returned in Data. @param Data Points to the buffer which will hold the returned variable value. + May be NULL with a zero DataSize in order to determine the size of the buffer needed. @retval EFI_SUCCESS The variable was read successfully. - @retval EFI_NOT_FOUND The variable could not be found. + @retval EFI_NOT_FOUND The variable was be found. @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the resulting data. DataSize is updated with the size required for the specified variable. @@ -965,7 +966,7 @@ PeiGetVariable ( IN CONST EFI_GUID *VariableGuid, OUT UINT32 *Attributes, IN OUT UINTN *DataSize, - OUT VOID *Data + OUT VOID *Data OPTIONAL ) { VARIABLE_POINTER_TRACK Variable; diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.h b/MdeModulePkg/Universal/Variable/Pei/Variable.h index 580d69fb42..9e47ccf5ee 100644 --- a/MdeModulePkg/Universal/Variable/Pei/Variable.h +++ b/MdeModulePkg/Universal/Variable/Pei/Variable.h @@ -2,7 +2,7 @@ The internal header file includes the common header files, defines internal structure and functions used by PeiVariable module. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
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 @@ -87,9 +87,10 @@ PeimInitializeVariableServices ( @param DataSize On entry, points to the size in bytes of the Data buffer. On return, points to the size of the data returned in Data. @param Data Points to the buffer which will hold the returned variable value. + May be NULL with a zero DataSize in order to determine the size of the buffer needed. @retval EFI_SUCCESS The variable was read successfully. - @retval EFI_NOT_FOUND The variable could not be found. + @retval EFI_NOT_FOUND The variable was not found. @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the resulting data. DataSize is updated with the size required for the specified variable. @@ -105,7 +106,7 @@ PeiGetVariable ( IN CONST EFI_GUID *VariableGuid, OUT UINT32 *Attributes, IN OUT UINTN *DataSize, - OUT VOID *Data + OUT VOID *Data OPTIONAL ); /**