]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Minor update to the Data parameter for PEI GetVariable()
authorStar Zeng <star.zeng@intel.com>
Wed, 21 Jun 2017 09:31:35 +0000 (17:31 +0800)
committerStar Zeng <star.zeng@intel.com>
Thu, 22 Jun 2017 09:56:12 +0000 (17:56 +0800)
PI 1.5 spec has minor update to the Data parameter for PEI
GetVariable(), and no real functional behavior change.

The modifier of Data parameter:
OUT VOID *Data
->
OUT VOID *Data OPTIONAL

The comments of Data parameter:
Data    Points to the buffer which will hold the returned variable value.
->
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.

The patch is to follow the spec to update the implementation.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Universal/Variable/Pei/Variable.c
MdeModulePkg/Universal/Variable/Pei/Variable.h

index a072c31e60e74c89683503e5716cf6dd32f40ea2..4060f4711dd07dd4ea533971ee099895f809b585 100644 (file)
@@ -947,9 +947,10 @@ FindVariable (
   @param  DataSize              On entry, points to the size in bytes of the Data buffer.\r
                                 On return, points to the size of the data returned in Data.\r
   @param  Data                  Points to the buffer which will hold the returned variable value.\r
+                                May be NULL with a zero DataSize in order to determine the size of the buffer needed.\r
 \r
   @retval EFI_SUCCESS           The variable was read successfully.\r
-  @retval EFI_NOT_FOUND         The variable could not be found.\r
+  @retval EFI_NOT_FOUND         The variable was be found.\r
   @retval EFI_BUFFER_TOO_SMALL  The DataSize is too small for the resulting data.\r
                                 DataSize is updated with the size required for\r
                                 the specified variable.\r
@@ -965,7 +966,7 @@ PeiGetVariable (
   IN CONST  EFI_GUID                        *VariableGuid,\r
   OUT       UINT32                          *Attributes,\r
   IN OUT    UINTN                           *DataSize,\r
-  OUT       VOID                            *Data\r
+  OUT       VOID                            *Data OPTIONAL\r
   )\r
 {\r
   VARIABLE_POINTER_TRACK  Variable;\r
index 580d69fb42c539666c67e4a25f0d8576267c9bff..9e47ccf5ee3de0ffcd1e3bd267add64b593f2333 100644 (file)
@@ -2,7 +2,7 @@
   The internal header file includes the common header files, defines\r
   internal structure and functions used by PeiVariable module.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -87,9 +87,10 @@ PeimInitializeVariableServices (
   @param  DataSize              On entry, points to the size in bytes of the Data buffer.\r
                                 On return, points to the size of the data returned in Data.\r
   @param  Data                  Points to the buffer which will hold the returned variable value.\r
+                                May be NULL with a zero DataSize in order to determine the size of the buffer needed.\r
 \r
   @retval EFI_SUCCESS           The variable was read successfully.\r
-  @retval EFI_NOT_FOUND         The variable could not be found.\r
+  @retval EFI_NOT_FOUND         The variable was not found.\r
   @retval EFI_BUFFER_TOO_SMALL  The DataSize is too small for the resulting data.\r
                                 DataSize is updated with the size required for\r
                                 the specified variable.\r
@@ -105,7 +106,7 @@ PeiGetVariable (
   IN CONST  EFI_GUID                        *VariableGuid,\r
   OUT       UINT32                          *Attributes,\r
   IN OUT    UINTN                           *DataSize,\r
-  OUT       VOID                            *Data\r
+  OUT       VOID                            *Data OPTIONAL\r
   );\r
 \r
 /**\r