]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Application / UiApp / FrontPageCustomizedUiSupport.c
index 93f6e4e88feff456f98d6a5f0b9a1395bddd7532..c9823e565de8c10bc9e122fc2c04c866e072ad5b 100644 (file)
@@ -3,13 +3,7 @@
   This library class defines a set of interfaces to customize Ui module\r
 \r
 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under\r
-the terms and conditions of the BSD License that accompanies this distribution.\r
-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
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 #include <Uefi.h>\r
@@ -43,6 +37,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define FRONT_PAGE_KEY_CONTINUE               0x1000\r
 #define FRONT_PAGE_KEY_RESET                  0x1001\r
 #define FRONT_PAGE_KEY_LANGUAGE               0x1002\r
+#define FRONT_PAGE_KEY_DRIVER                 0x2000\r
 \r
 typedef struct {\r
   EFI_STRING_ID   PromptId;\r
@@ -638,9 +633,13 @@ UiListThirdPartyDrivers (
 \r
     Count++;\r
     if (Count >= CurrentSize) {\r
-      DriverListPtr = AllocateCopyPool ((Count + UI_HII_DRIVER_LIST_SIZE) * sizeof (UI_HII_DRIVER_INSTANCE), gHiiDriverList);\r
+      DriverListPtr = ReallocatePool (\r
+                        CurrentSize * sizeof (UI_HII_DRIVER_INSTANCE),\r
+                        (Count + UI_HII_DRIVER_LIST_SIZE)\r
+                          * sizeof (UI_HII_DRIVER_INSTANCE),\r
+                        gHiiDriverList\r
+                        );\r
       ASSERT (DriverListPtr != NULL);\r
-      FreePool (gHiiDriverList);\r
       gHiiDriverList = DriverListPtr;\r
       CurrentSize += UI_HII_DRIVER_LIST_SIZE;\r
     }\r
@@ -656,7 +655,7 @@ UiListThirdPartyDrivers (
       gHiiDriverList[Index].PromptId,\r
       gHiiDriverList[Index].HelpId,\r
       0,\r
-      0,\r
+      (EFI_QUESTION_ID) (Index + FRONT_PAGE_KEY_DRIVER),\r
       0,\r
       &gHiiDriverList[Index].FormSetGuid,\r
       gHiiDriverList[Index].DevicePathId\r