]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Library / BootMaintenanceManagerUiLib / UpdatePage.c
index b3cc3c88dd0dae26a19ac6f07219dd7243607344..f598c46a5a8aaa0a43c02f560f86f77082f7860e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Dynamically update the pages.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, 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
@@ -28,16 +28,16 @@ CreateUpdateData (
   //\r
   mStartOpCodeHandle = HiiAllocateOpCodeHandle ();\r
   ASSERT (mStartOpCodeHandle != NULL);\r
-  \r
+\r
   mEndOpCodeHandle = HiiAllocateOpCodeHandle ();\r
   ASSERT (mEndOpCodeHandle != NULL);\r
-  \r
+\r
   //\r
   // Create Hii Extend Label OpCode as the start opcode\r
   //\r
   mStartLabel = (EFI_IFR_GUID_LABEL *) HiiCreateGuidOpCode (mStartOpCodeHandle, &gEfiIfrTianoGuid, NULL, sizeof (EFI_IFR_GUID_LABEL));\r
   mStartLabel->ExtendOpCode = EFI_IFR_EXTEND_OP_LABEL;\r
-  \r
+\r
   //\r
   // Create Hii Extend Label OpCode as the end opcode\r
   //\r
@@ -57,7 +57,7 @@ RefreshUpdateData (
 {\r
   //\r
   // Free current updated date\r
-  //  \r
+  //\r
   if (mStartOpCodeHandle != NULL) {\r
     HiiFreeOpCodeHandle (mStartOpCodeHandle);\r
   }\r
@@ -78,7 +78,7 @@ RefreshUpdateData (
 /**\r
   Add a "Go back to main page" tag in front of the form when there are no\r
   "Apply changes" and "Discard changes" tags in the end of the form.\r
\r
+\r
   @param CallbackData    The BMM context data.\r
 \r
 **/\r
@@ -162,7 +162,7 @@ UpdatePageEnd (
 }\r
 \r
 /**\r
-  Clean up the dynamic opcode at label and form specified by both LabelId. \r
+  Clean up the dynamic opcode at label and form specified by both LabelId.\r
 \r
   @param LabelId         It is both the Form ID and Label ID for opcode deletion.\r
   @param CallbackData    The BMM context data.\r
@@ -264,7 +264,7 @@ UpdateBootDelPage (
       CallbackData->BmmFakeNvData.BootOptionDel[Index] = FALSE;\r
       CallbackData->BmmOldFakeNVData.BootOptionDel[Index] = FALSE;\r
     }\r
-    \r
+\r
     HiiCreateCheckBoxOpCode (\r
       mStartOpCodeHandle,\r
       (EFI_QUESTION_ID) (BOOT_OPTION_DEL_QUESTION_ID + Index),\r
@@ -368,7 +368,7 @@ UpdateDrvDelPage (
 }\r
 \r
 /**\r
-  Prepare the page to allow user to add description for \r
+  Prepare the page to allow user to add description for\r
   a Driver Option.\r
 \r
   @param CallbackData    The BMM context data.\r
@@ -582,8 +582,8 @@ UpdateOrderPage (
   OptionOrder = NULL;\r
   QuestionId = 0;\r
   VarOffset = 0;\r
-  switch (UpdatePageId) { \r
-  \r
+  switch (UpdatePageId) {\r
+\r
   case FORM_BOOT_CHG_ID:\r
     //\r
     // If the BootOptionOrder in the BmmFakeNvData are same with the date in the BmmOldFakeNVData,\r
@@ -598,7 +598,7 @@ UpdateOrderPage (
     QuestionId = BOOT_OPTION_ORDER_QUESTION_ID;\r
     VarOffset = BOOT_OPTION_ORDER_VAR_OFFSET;\r
     break;\r
-    \r
+\r
   case FORM_DRV_CHG_ID:\r
     //\r
     // If the DriverOptionOrder in the BmmFakeNvData are same with the date in the BmmOldFakeNVData,\r
@@ -613,12 +613,12 @@ UpdateOrderPage (
     QuestionId = DRIVER_OPTION_ORDER_QUESTION_ID;\r
     VarOffset = DRIVER_OPTION_ORDER_VAR_OFFSET;\r
     break;\r
-  }  \r
-  ASSERT (OptionOrder != NULL);   \r
-  \r
+  }\r
+  ASSERT (OptionOrder != NULL);\r
+\r
   OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();\r
   ASSERT (OptionsOpCodeHandle != NULL);\r
-  \r
+\r
   NewMenuEntry = NULL;\r
   for (OptionIndex = 0; (OptionOrder[OptionIndex] != 0 && OptionIndex < MAX_MENU_NUMBER); OptionIndex++) {\r
     BootOptionFound = FALSE;\r
@@ -639,21 +639,21 @@ UpdateOrderPage (
         );\r
     }\r
   }\r
-  \r
+\r
   if (OptionMenu->MenuNumber > 0) {\r
-    HiiCreateOrderedListOpCode (                   \r
-      mStartOpCodeHandle,                          // Container for dynamic created opcodes     \r
-      QuestionId,                                  // Question ID                               \r
-      VARSTORE_ID_BOOT_MAINT,                      // VarStore ID                               \r
-      VarOffset,                                   // Offset in Buffer Storage                  \r
-      STRING_TOKEN (STR_CHANGE_ORDER),             // Question prompt text                      \r
-      STRING_TOKEN (STR_CHANGE_ORDER),             // Question help text                        \r
-      0,                                           // Question flag                             \r
+    HiiCreateOrderedListOpCode (\r
+      mStartOpCodeHandle,                          // Container for dynamic created opcodes\r
+      QuestionId,                                  // Question ID\r
+      VARSTORE_ID_BOOT_MAINT,                      // VarStore ID\r
+      VarOffset,                                   // Offset in Buffer Storage\r
+      STRING_TOKEN (STR_CHANGE_ORDER),             // Question prompt text\r
+      STRING_TOKEN (STR_CHANGE_ORDER),             // Question help text\r
+      0,                                           // Question flag\r
       0,                                           // Ordered list flag, e.g. EFI_IFR_UNIQUE_SET\r
-      EFI_IFR_TYPE_NUM_SIZE_32,                    // Data type of Question value               \r
-      100,                                         // Maximum container                         \r
-      OptionsOpCodeHandle,                         // Option Opcode list                        \r
-      NULL                                         // Default Opcode is NULL                    \r
+      EFI_IFR_TYPE_NUM_SIZE_32,                    // Data type of Question value\r
+      100,                                         // Maximum container\r
+      OptionsOpCodeHandle,                         // Option Opcode list\r
+      NULL                                         // Default Opcode is NULL\r
       );\r
   }\r
 \r
@@ -730,7 +730,7 @@ UpdateConModePage (
     if (EFI_ERROR (Status)) {\r
       continue;\r
     }\r
-    \r
+\r
     //\r
     // Build mode string Column x Row\r
     //\r
@@ -848,7 +848,7 @@ UpdateTerminalPage (
     OptionsOpCodeHandle,\r
     NULL\r
     );\r
-  \r
+\r
   HiiFreeOpCodeHandle (OptionsOpCodeHandle);\r
   OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();\r
   ASSERT (OptionsOpCodeHandle != NULL);\r
@@ -1013,7 +1013,7 @@ UpdateTerminalPage (
 \r
   UpdatePageEnd (CallbackData);\r
 }\r
\r
+\r
 /**\r
 Update add boot/driver option page.\r
 \r