Implement ReadOnly Variable Services required by PEIM and install\r
PEI ReadOnly Varaiable2 PPI. These services operates the non volatile storage space.\r
\r
-Copyright (c) 2006 - 2015, 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
@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
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
return EFI_INVALID_PARAMETER;\r
}\r
\r
+ if (VariableName[0] == 0) {\r
+ return EFI_NOT_FOUND;\r
+ }\r
+\r
VariableHeader = NULL;\r
\r
//\r