]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
Report the setting variable failure to platform through the status code when core...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / FrontPage.c
index 432b22469ec535a52ddef442af6a4f660fd58aa5..3bbe71a8fe7c0082d80648022f30f4615f3a6c18 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   FrontPage routines to handle the callbacks and browser calls\r
 \r
-Copyright (c) 2004 - 2013, 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
@@ -182,7 +182,6 @@ FrontPageCallback (
   CHAR8                         *LangCode;\r
   CHAR8                         *Lang;\r
   UINTN                         Index;\r
-  EFI_STATUS                    Status;\r
 \r
   if (Action != EFI_BROWSER_ACTION_CHANGING && Action != EFI_BROWSER_ACTION_CHANGED) {\r
     //\r
@@ -226,14 +225,13 @@ FrontPageCallback (
       }\r
 \r
       if (Index == Value->u8) {\r
-        Status = gRT->SetVariable (\r
+        BdsDxeSetVariableAndReportStatusCodeOnError (\r
                         L"PlatformLang",\r
                         &gEfiGlobalVariableGuid,\r
                         EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
                         AsciiStrSize (Lang),\r
                         Lang\r
                         );\r
-        ASSERT_EFI_ERROR(Status);\r
       } else {\r
         ASSERT (FALSE);\r
       }\r
@@ -1095,6 +1093,9 @@ PlatformBdsEnterFrontPage (
                     sizeof(UINT64),\r
                     &OsIndication\r
                     );\r
+    //\r
+    // Changing the content without increasing its size with current variable implementation shouldn't fail.\r
+    //\r
     ASSERT_EFI_ERROR (Status);\r
 \r
     //\r