]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg Variable: Minor update to the Data parameter for GetVariable()
authorStar Zeng <star.zeng@intel.com>
Fri, 29 Jan 2016 09:15:43 +0000 (09:15 +0000)
committerlzeng14 <lzeng14@Edk2>
Fri, 29 Jan 2016 09:15:43 +0000 (09:15 +0000)
UEFI 2.6 spec has minor update to the Data parameter for 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 The buffer to return the contents of the variable.
->
Data The buffer to return the contents of the variable. May be NULL
        with a zero DataSize in order to determine the size 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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19771 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Variable/EmuRuntimeDxe/InitVariable.c
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c

index d636fcf20d2c663f40ee3fa92d5ca58ec4b7eda7..1feedc07c332eb0180a3b8e635d1a52f8f8e8102 100644 (file)
@@ -3,7 +3,7 @@
   Implment all four UEFI runtime variable services and \r
   install variable architeture protocol.\r
   \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, 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
@@ -27,7 +27,8 @@ EFI_EVENT   mVirtualAddressChangeEvent = NULL;
   @param Attributes                 Attribute value of the variable found.\r
   @param DataSize                   Size of Data found. If size is less than the\r
                                     data, this value contains the required size.\r
-  @param Data                       Data pointer.\r
+  @param Data                       The buffer to return the contents of the variable. May be NULL\r
+                                    with a zero DataSize in order to determine the size buffer needed.\r
                       \r
   @return EFI_INVALID_PARAMETER     Invalid parameter\r
   @return EFI_SUCCESS               Find the specified variable\r
@@ -42,7 +43,7 @@ RuntimeServiceGetVariable (
   IN EFI_GUID      *VendorGuid,\r
   OUT UINT32       *Attributes OPTIONAL,\r
   IN OUT UINTN     *DataSize,\r
-  OUT VOID         *Data\r
+  OUT VOID         *Data OPTIONAL\r
   )\r
 {\r
   return EmuGetVariable (\r
index 5e39d44d4c7a5fc611f8a90193ccfac741f0a157..3f0240bc072f6ef2e5bd4e7eacfb7ae6e09a8368 100644 (file)
@@ -2822,7 +2822,8 @@ Done:
   @param Attributes                 Attribute value of the variable found.\r
   @param DataSize                   Size of Data found. If size is less than the\r
                                     data, this value contains the required size.\r
-  @param Data                       Data pointer.\r
+  @param Data                       The buffer to return the contents of the variable. May be NULL\r
+                                    with a zero DataSize in order to determine the size buffer needed.\r
 \r
   @return EFI_INVALID_PARAMETER     Invalid parameter.\r
   @return EFI_SUCCESS               Find the specified variable.\r
@@ -2837,7 +2838,7 @@ VariableServiceGetVariable (
   IN      EFI_GUID          *VendorGuid,\r
   OUT     UINT32            *Attributes OPTIONAL,\r
   IN OUT  UINTN             *DataSize,\r
-  OUT     VOID              *Data\r
+  OUT     VOID              *Data OPTIONAL\r
   )\r
 {\r
   EFI_STATUS              Status;\r