]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Library / BootMaintenanceManagerUiLib / BootMaintenance.c
index fdcb56a9df2b5d7012767eef22c980f12d6d31dc..b4f4dff98d85f0e08b5d8b37a88aeec9f6d613ea 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 The functions for Boot Maintainence Main menu.\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
@@ -61,7 +61,7 @@ HII_VENDOR_DEVICE_PATH  mBmmHiiVendorDevicePath = {
   {\r
     END_DEVICE_PATH_TYPE,\r
     END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
-    { \r
+    {\r
       (UINT8) (END_DEVICE_PATH_LENGTH),\r
       (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
     }\r
@@ -118,9 +118,9 @@ CustomizeMenus (
 \r
 /**\r
   This function will change video resolution and text mode\r
-  according to defined setup mode or defined boot mode  \r
+  according to defined setup mode or defined boot mode\r
 \r
-  @param  IsSetupMode   Indicate mode is changed to setup mode or boot mode. \r
+  @param  IsSetupMode   Indicate mode is changed to setup mode or boot mode.\r
 \r
   @retval  EFI_SUCCESS  Mode is changed successfully.\r
   @retval  Others       Mode failed to be changed.\r
@@ -147,13 +147,13 @@ BmmSetConsoleMode (
   EFI_STATUS                            Status;\r
   UINTN                                 Index;\r
   UINTN                                 CurrentColumn;\r
-  UINTN                                 CurrentRow;  \r
+  UINTN                                 CurrentRow;\r
 \r
   MaxGopMode  = 0;\r
   MaxTextMode = 0;\r
 \r
   //\r
-  // Get current video resolution and text mode \r
+  // Get current video resolution and text mode\r
   //\r
   Status = gBS->HandleProtocol (\r
                   gST->ConsoleOutHandle,\r
@@ -171,7 +171,7 @@ BmmSetConsoleMode (
                   );\r
   if (EFI_ERROR (Status)) {\r
     SimpleTextOut = NULL;\r
-  }  \r
+  }\r
 \r
   if ((GraphicsOutput == NULL) || (SimpleTextOut == NULL)) {\r
     return EFI_UNSUPPORTED;\r
@@ -192,12 +192,12 @@ BmmSetConsoleMode (
     NewHorizontalResolution = mBmmBootHorizontalResolution;\r
     NewVerticalResolution   = mBmmBootVerticalResolution;\r
     NewColumns              = mBmmBootTextModeColumn;\r
-    NewRows                 = mBmmBootTextModeRow;   \r
+    NewRows                 = mBmmBootTextModeRow;\r
   }\r
 \r
   if (GraphicsOutput != NULL) {\r
     MaxGopMode  = GraphicsOutput->Mode->MaxMode;\r
-  } \r
+  }\r
 \r
   if (SimpleTextOut != NULL) {\r
     MaxTextMode = SimpleTextOut->Mode->MaxMode;\r
@@ -743,7 +743,7 @@ BootMaintExtractConfig (
 \r
   @param[in]  This                Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
   @param[in]  Configuration       A null-terminated Unicode string in\r
-                                  <ConfigString> format.   \r
+                                  <ConfigString> format.\r
   @param[out] Progress            A pointer to a string filled in with the\r
                                   offset of the most recent '&' before the\r
                                   first failing name / value pair (or the\r
@@ -753,7 +753,7 @@ BootMaintExtractConfig (
                                   successful.\r
 \r
   @retval EFI_SUCCESS             The results have been distributed or are\r
-                                  awaiting distribution.  \r
+                                  awaiting distribution.\r
   @retval EFI_OUT_OF_RESOURCES    Not enough memory to store the\r
                                   parts of the results that must be\r
                                   stored awaiting possible future\r
@@ -802,15 +802,15 @@ BootMaintRouteConfig (
   }\r
 \r
   Status = gBS->LocateProtocol (\r
-                  &gEfiHiiConfigRoutingProtocolGuid, \r
-                  NULL, \r
+                  &gEfiHiiConfigRoutingProtocolGuid,\r
+                  NULL,\r
                   (VOID **)&ConfigRouting\r
                   );\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
 \r
-  Private = BMM_CALLBACK_DATA_FROM_THIS (This);  \r
+  Private = BMM_CALLBACK_DATA_FROM_THIS (This);\r
   //\r
   // Get Buffer Storage data from EFI variable\r
   //\r
@@ -828,15 +828,15 @@ BootMaintRouteConfig (
                             &BufferSize,\r
                             Progress\r
                             );\r
-  ASSERT_EFI_ERROR (Status);    \r
+  ASSERT_EFI_ERROR (Status);\r
   //\r
-  // Compare new and old BMM configuration data and only do action for modified item to \r
+  // Compare new and old BMM configuration data and only do action for modified item to\r
   // avoid setting unnecessary non-volatile variable\r
   //\r
 \r
   //\r
   // Check data which located in BMM main page and save the settings if need\r
-  //         \r
+  //\r
   if (CompareMem (&NewBmmData->BootNext, &OldBmmData->BootNext, sizeof (NewBmmData->BootNext)) != 0) {\r
     Status = Var_UpdateBootNext (Private);\r
     if (EFI_ERROR (Status)) {\r
@@ -847,10 +847,10 @@ BootMaintRouteConfig (
 \r
   //\r
   // Check data which located in Boot Options Menu and save the settings if need\r
-  //      \r
-  if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) {  \r
-    for (Index = 0; \r
-         ((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0])))); \r
+  //\r
+  if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) {\r
+    for (Index = 0;\r
+         ((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0]))));\r
          Index ++) {\r
       NewMenuEntry            = BOpt_GetMenuEntry (&BootOptionMenu, Index);\r
       NewLoadContext          = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;\r
@@ -891,10 +891,10 @@ BootMaintRouteConfig (
 \r
   //\r
   // Check data which located in Driver Options Menu and save the settings if need\r
-  //              \r
-  if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) {       \r
-    for (Index = 0; \r
-         ((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0])))); \r
+  //\r
+  if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) {\r
+    for (Index = 0;\r
+         ((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0]))));\r
          Index++) {\r
       NewMenuEntry            = BOpt_GetMenuEntry (&DriverOptionMenu, Index);\r
       NewLoadContext          = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;\r
@@ -909,7 +909,7 @@ BootMaintRouteConfig (
     }\r
   }\r
 \r
-  if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) {  \r
+  if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) {\r
     Status = Var_UpdateDriverOrder (Private);\r
     if (EFI_ERROR (Status)) {\r
       Offset = OFFSET_OF (BMM_FAKE_NV_DATA, DriverOptionOrder);\r
@@ -1128,14 +1128,14 @@ BootMaintCallback (
     if (Value == NULL) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-    \r
+\r
     UpdatePageId (Private, QuestionId);\r
 \r
     if (QuestionId < FILE_OPTION_OFFSET) {\r
       if (QuestionId < CONFIG_OPTION_OFFSET) {\r
         switch (QuestionId) {\r
         case FORM_BOOT_ADD_ID:\r
-          // Leave BMM and enter FileExplorer. \r
+          // Leave BMM and enter FileExplorer.\r
           ChooseFile (NULL, L".efi", CreateBootOptionFromFile, &File);\r
           break;\r
 \r
@@ -1213,7 +1213,7 @@ BootMaintCallback (
     if ((Value == NULL) || (ActionRequest == NULL)) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-   \r
+\r
     if (QuestionId == KEY_VALUE_SAVE_AND_EXIT_BOOT) {\r
       CleanUselessBeforeSubmit (Private);\r
       CurrentFakeNVMap->BootOptionChanged = FALSE;\r
@@ -1247,7 +1247,7 @@ BootMaintCallback (
       CurrentFakeNVMap->BootOptionChanged = TRUE;\r
     } else if (QuestionId == KEY_VALUE_DRIVER_DESCRIPTION || QuestionId == KEY_VALUE_DRIVER_OPTION) {\r
       CurrentFakeNVMap->DriverOptionChanged = TRUE;\r
-    } \r
+    }\r
 \r
     if ((QuestionId >= BOOT_OPTION_DEL_QUESTION_ID) && (QuestionId < BOOT_OPTION_DEL_QUESTION_ID + MAX_MENU_NUMBER)) {\r
       if (Value->b){\r
@@ -1718,7 +1718,7 @@ BootMaintenanceManagerUiLibConstructor (
 \r
   CreateUpdateData();\r
   //\r
-  // Update boot maintenance manager page \r
+  // Update boot maintenance manager page\r
   //\r
   InitializeBmmConfig(mBmmCallbackInfo);\r
 \r