]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/BdsLib/BdsLoadOption.c
ArmPkg: Introduce GetGlobalEnvironmentVariable() function.
[mirror_edk2.git] / ArmPkg / Library / BdsLib / BdsLoadOption.c
index 3f4566ffab133e06396d896213274e2d5bd89ad6..be5ed41980a325177414fea9f2b9ea9884b77bab 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2013, 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
@@ -76,7 +76,7 @@ BootOptionFromLoadOptionVariable (
   EFI_LOAD_OPTION       EfiLoadOption;\r
   UINTN                 EfiLoadOptionSize;\r
 \r
-  Status = GetEnvironmentVariable (BootVariableName, NULL, &EfiLoadOptionSize, (VOID**)&EfiLoadOption);\r
+  Status = GetGlobalEnvironmentVariable (BootVariableName, NULL, &EfiLoadOptionSize, (VOID**)&EfiLoadOption);\r
   if (!EFI_ERROR(Status)) {\r
     *BdsLoadOption = NULL;\r
     Status = BootOptionParseLoadOption (EfiLoadOption, EfiLoadOptionSize, BdsLoadOption);\r
@@ -203,7 +203,7 @@ BootOptionToLoadOptionVariable (
   // When it is a new entry we must add the entry to the BootOrder\r
   if (OldLoadOption == NULL) {\r
     // Add the new Boot Index to the list\r
-    Status = GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
+    Status = GetGlobalEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
     if (!EFI_ERROR(Status)) {\r
       BootOrder = ReallocatePool (BootOrderSize, BootOrderSize + sizeof(UINT16), BootOrder);\r
       // Add the new index at the end\r
@@ -225,7 +225,7 @@ BootOptionToLoadOptionVariable (
         );\r
     DEBUG((EFI_D_ERROR,"Create %s\n",BootVariableName));\r
 \r
-    // Free memory allocated by GetEnvironmentVariable\r
+    // Free memory allocated by GetGlobalEnvironmentVariable\r
     if (!EFI_ERROR(Status)) {\r
       FreePool (BootOrder);\r
     }\r
@@ -249,7 +249,7 @@ BootOptionAllocateBootIndex (
   BOOLEAN           Found;\r
 \r
   // Get the Boot Option Order from the environment variable\r
-  Status = GetEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
+  Status = GetGlobalEnvironmentVariable (L"BootOrder", NULL, &BootOrderSize, (VOID**)&BootOrder);\r
   if (!EFI_ERROR(Status)) {\r
     for (BootIndex = 0; BootIndex <= 0xFFFF; BootIndex++) {\r
       Found = FALSE;\r