]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
Report the setting variable failure to platform through the status code when core...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMaint / BBSsupport.c
index db0fed5834d512b415784f86e537d6f745ef131c..adf84f42f78e1d35d1696a2d44e91f418b5a5c92 100644 (file)
@@ -3,7 +3,7 @@
   and manage the legacy boot option, all legacy boot option is getting from\r
   the legacy BBS table.\r
 \r
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, 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
@@ -143,6 +143,9 @@ OrderLegacyBootOption4SameType (
                   BootOrderSize,\r
                   BootOrder\r
                   );\r
+  //\r
+  // Changing content without increasing its size with current variable implementation shouldn't fail.\r
+  //\r
   ASSERT_EFI_ERROR (Status);\r
 \r
   FreePool (NewBootOption);\r
@@ -171,6 +174,7 @@ GroupMultipleLegacyBootOption4SameType (
   VOID\r
   )\r
 {\r
+  EFI_STATUS                   Status;\r
   UINTN                        Index;\r
   UINTN                        DeviceIndex;\r
   UINTN                        DeviceTypeIndex[7];\r
@@ -233,13 +237,17 @@ GroupMultipleLegacyBootOption4SameType (
     FreePool (BootOption);\r
   }\r
 \r
-  gRT->SetVariable (\r
-         L"BootOrder",\r
-         &gEfiGlobalVariableGuid,\r
-         EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
-         BootOrderSize,\r
-         BootOrder\r
-         );\r
+  Status = gRT->SetVariable (\r
+                  L"BootOrder",\r
+                  &gEfiGlobalVariableGuid,\r
+                  EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
+                  BootOrderSize,\r
+                  BootOrder\r
+                  );\r
+  //\r
+  // Changing content without increasing its size with current variable implementation shouldn't fail.\r
+  //\r
+  ASSERT_EFI_ERROR (Status);\r
   FreePool (BootOrder);\r
 }\r
 \r