/** @file\r
*\r
-* Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
-* \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
-* http://opensource.org/licenses/bsd-license.php \r
+* Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
*\r
-* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \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
+* http://opensource.org/licenses/bsd-license.php\r
+*\r
+* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
*\r
**/\r
\r
SerialPortWrite ((UINT8 *) Buffer, CharCount);\r
}\r
\r
+EFI_STATUS\r
+GetGlobalEnvironmentVariable (\r
+ IN CONST CHAR16* VariableName,\r
+ IN VOID* DefaultValue,\r
+ IN OUT UINTN* Size,\r
+ OUT VOID** Value\r
+ )\r
+{\r
+ return GetEnvironmentVariable (VariableName, &gEfiGlobalVariableGuid,\r
+ DefaultValue, Size, Value);\r
+}\r
+\r
EFI_STATUS\r
GetEnvironmentVariable (\r
IN CONST CHAR16* VariableName,\r
+ IN EFI_GUID* VendorGuid,\r
IN VOID* DefaultValue,\r
IN OUT UINTN* Size,\r
OUT VOID** Value\r
// Try to get the variable size.\r
*Value = NULL;\r
VariableSize = 0;\r
- Status = gRT->GetVariable ((CHAR16 *) VariableName, &gEfiGlobalVariableGuid, NULL, &VariableSize, *Value);\r
+ Status = gRT->GetVariable ((CHAR16 *) VariableName, VendorGuid, NULL, &VariableSize, *Value);\r
if (Status == EFI_NOT_FOUND) {\r
if ((DefaultValue != NULL) && (Size != NULL) && (*Size != 0)) {\r
// If the environment variable does not exist yet then set it with the default value\r
Status = gRT->SetVariable (\r
(CHAR16*)VariableName,\r
- &gEfiGlobalVariableGuid,\r
+ VendorGuid,\r
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
*Size,\r
DefaultValue\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
- Status = gRT->GetVariable ((CHAR16 *)VariableName, &gEfiGlobalVariableGuid, NULL, &VariableSize, *Value);\r
+ Status = gRT->GetVariable ((CHAR16 *)VariableName, VendorGuid, NULL, &VariableSize, *Value);\r
if (EFI_ERROR (Status)) {\r
FreePool(*Value);\r
return EFI_INVALID_PARAMETER;\r