MdeModulePkg:Change the type of BootNext
[mirror_edk2.git] / MdeModulePkg / Library / BootMaintenanceManagerLib / UpdatePage.c
index 78ace0c13512d73662754ff55196066e3a9249ae..cd1756aa588a677d669b83a553201384f2520550 100644 (file)
@@ -686,7 +686,7 @@ UpdateBootNextPage (
     OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();\r
     ASSERT (OptionsOpCodeHandle != NULL);\r
 \r
-    CallbackData->BmmFakeNvData.BootNext = (UINT16) (BootOptionMenu.MenuNumber);\r
+    CallbackData->BmmFakeNvData.BootNext = NONE_BOOTNEXT_VALUE;\r
 \r
     for (Index = 0; Index < BootOptionMenu.MenuNumber; Index++) {\r
       NewMenuEntry    = BOpt_GetMenuEntry (&BootOptionMenu, Index);\r
@@ -697,7 +697,7 @@ UpdateBootNextPage (
           OptionsOpCodeHandle,\r
           NewMenuEntry->DisplayStringToken,\r
           EFI_IFR_OPTION_DEFAULT,\r
-          EFI_IFR_TYPE_NUM_SIZE_16,\r
+          EFI_IFR_TYPE_NUM_SIZE_32,\r
           Index\r
           );\r
         CallbackData->BmmFakeNvData.BootNext = Index;\r
@@ -706,27 +706,27 @@ UpdateBootNextPage (
           OptionsOpCodeHandle,\r
           NewMenuEntry->DisplayStringToken,\r
           0,\r
-          EFI_IFR_TYPE_NUM_SIZE_16,\r
+          EFI_IFR_TYPE_NUM_SIZE_32,\r
           Index\r
           );\r
       }\r
     }\r
 \r
-    if (CallbackData->BmmFakeNvData.BootNext == Index) {\r
+    if (CallbackData->BmmFakeNvData.BootNext == NONE_BOOTNEXT_VALUE) {\r
       HiiCreateOneOfOptionOpCode (\r
         OptionsOpCodeHandle,\r
         STRING_TOKEN (STR_NONE),\r
         EFI_IFR_OPTION_DEFAULT,\r
-        EFI_IFR_TYPE_NUM_SIZE_16,\r
-        Index\r
+        EFI_IFR_TYPE_NUM_SIZE_32,\r
+        NONE_BOOTNEXT_VALUE\r
         );\r
     } else {\r
       HiiCreateOneOfOptionOpCode (\r
         OptionsOpCodeHandle,\r
         STRING_TOKEN (STR_NONE),\r
         0,\r
-        EFI_IFR_TYPE_NUM_SIZE_16,\r
-        Index\r
+        EFI_IFR_TYPE_NUM_SIZE_32,\r
+        NONE_BOOTNEXT_VALUE\r
         );\r
     }      \r
 \r
@@ -738,7 +738,7 @@ UpdateBootNextPage (
       STRING_TOKEN (STR_BOOT_NEXT),\r
       STRING_TOKEN (STR_BOOT_NEXT_HELP),\r
       0,\r
-      EFI_IFR_NUMERIC_SIZE_2,\r
+      EFI_IFR_NUMERIC_SIZE_4,\r
       OptionsOpCodeHandle,\r
       NULL\r
       );\r