public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Star Zeng <star.zeng@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>, Liming Gao <liming.gao@intel.com>
Subject: [PATCH 2/2] MdeModulePkg: Minor update to the Data parameter for PEI GetVariable()
Date: Wed, 21 Jun 2017 17:49:30 +0800	[thread overview]
Message-ID: <1498038570-146532-3-git-send-email-star.zeng@intel.com> (raw)
In-Reply-To: <1498038570-146532-1-git-send-email-star.zeng@intel.com>

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>
---
 MdeModulePkg/Universal/Variable/Pei/Variable.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c
index a072c31e60e7..4060f4711dd0 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;
-- 
2.7.0.windows.1



  parent reply	other threads:[~2017-06-21  9:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21  9:49 [PATCH 0/2] Minor update to the Data parameter for PEI GetVariable() Star Zeng
2017-06-21  9:49 ` [PATCH 1/2] MdePkg: " Star Zeng
2017-06-21  9:49 ` Star Zeng [this message]
2017-06-21 12:11 ` [PATCH 0/2] " Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1498038570-146532-3-git-send-email-star.zeng@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox