]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUi.c
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / LegacyBootMaintUiLib / LegacyBootMaintUi.c
index 3092184ab7608b4a79f0e5f6942942486317da2c..ad57764b388ee78610979170f3d16d84558937f0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Legacy Boot Maintainence UI implementation.\r
 \r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -84,13 +84,13 @@ HII_VENDOR_DEVICE_PATH  mLegacyBootOptionHiiVendorDevicePath = {
         (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
         (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)\r
       }\r
-    }, \r
+    },\r
     { 0x6bc75598, 0x89b4, 0x483d, { 0x91, 0x60, 0x7f, 0x46, 0x9a, 0x96, 0x35, 0x31 } }\r
   },\r
   {\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
@@ -151,9 +151,9 @@ OrderLegacyBootOption4SameType (
   UINTN                    BootOrderSize;\r
   UINTN                    Index;\r
   UINTN                    StartPosition;\r
-  \r
+\r
   EFI_BOOT_MANAGER_LOAD_OPTION    BootOption;\r
-  \r
+\r
   CHAR16                           OptionName[sizeof ("Boot####")];\r
   UINT16                   *BbsIndexArray;\r
   UINT16                   *DeviceTypeArray;\r
@@ -176,11 +176,11 @@ OrderLegacyBootOption4SameType (
   ASSERT (*DisBootOption != NULL);\r
 \r
   for (Index = 0; Index < BootOrderSize / sizeof (UINT16); Index++) {\r
-  \r
+\r
     UnicodeSPrint (OptionName, sizeof (OptionName), L"Boot%04x", BootOrder[Index]);\r
     Status = EfiBootManagerVariableToLoadOption (OptionName, &BootOption);\r
     ASSERT_EFI_ERROR (Status);\r
-    \r
+\r
     if ((DevicePathType (BootOption.FilePath) == BBS_DEVICE_PATH) &&\r
         (DevicePathSubType (BootOption.FilePath) == BBS_BBS_DP)) {\r
       //\r
@@ -209,7 +209,7 @@ OrderLegacyBootOption4SameType (
       if (BbsIndexArray[Index] == (DevOrder[DevOrderCount] & 0xFF)) {\r
         StartPosition = MIN (StartPosition, Index);\r
         NewBootOption[DevOrderCount] = BootOrder[Index];\r
-        \r
+\r
         if ((DevOrder[DevOrderCount] & 0xFF00) == 0xFF00) {\r
           (*DisBootOption)[*DisBootOptionCount] = BootOrder[Index];\r
           (*DisBootOptionCount)++;\r
@@ -283,7 +283,7 @@ UpdateBBSOption (
   UINT16                      *DisBootOption;\r
   UINTN                       DisBootOptionCount;\r
   UINTN                       BufferSize;\r
-  \r
+\r
 \r
   DisMap              = NULL;\r
   NewOrder            = NULL;\r
@@ -291,7 +291,7 @@ UpdateBBSOption (
   EnBootOption        = NULL;\r
   DisBootOption       = NULL;\r
 \r
-  \r
+\r
   DisMap  = mLegacyBootOptionPrivate->MaintainMapData->DisableMap;\r
   Status  = EFI_SUCCESS;\r
 \r
@@ -470,7 +470,7 @@ UpdateBBSOption (
 \r
     CurrentType++;\r
   }\r
-  \r
+\r
   Status = gRT->SetVariable (\r
                   VAR_LEGACY_DEV_ORDER,\r
                   &gEfiLegacyDevOrderVariableGuid,\r
@@ -575,8 +575,8 @@ LegacyBootOptionRouteConfig (
   }\r
 \r
   Status = gBS->LocateProtocol (\r
-                  &gEfiHiiConfigRoutingProtocolGuid, \r
-                  NULL, \r
+                  &gEfiHiiConfigRoutingProtocolGuid,\r
+                  NULL,\r
                   (VOID **) &ConfigRouting\r
                   );\r
   if (EFI_ERROR (Status)) {\r
@@ -594,7 +594,7 @@ LegacyBootOptionRouteConfig (
                             &BufferSize,\r
                             Progress\r
                             );\r
-  ASSERT_EFI_ERROR (Status);    \r
+  ASSERT_EFI_ERROR (Status);\r
 \r
   Status = UpdateBBSOption (CurrentNVMapData);\r
 \r
@@ -690,7 +690,7 @@ GetMenuEntry (
 \r
 /**\r
   Create string tokens for a menu from its help strings and display strings\r
-  \r
+\r
   @param HiiHandle          Hii Handle of the package to be updated.\r
   @param MenuOption         The Menu whose string tokens need to be created\r
 \r
@@ -817,7 +817,7 @@ UpdateLegacyDeviceOrderPage (
     DEBUG ((EFI_D_ERROR, "Invalid command ID for updating page!\n"));\r
     return;\r
   }\r
-  \r
+\r
   HiiSetString (mLegacyBootOptionPrivate->HiiHandle, STRING_TOKEN(STR_ORDER_CHANGE_PROMPT), FormTitle, NULL);\r
 \r
   CreateLegacyMenuStringToken (mLegacyBootOptionPrivate->HiiHandle, OptionMenu);\r
@@ -859,12 +859,12 @@ UpdateLegacyDeviceOrderPage (
     ASSERT (DefaultOpCodeHandle != NULL);\r
 \r
     HiiCreateDefaultOpCode (\r
-      DefaultOpCodeHandle, \r
-      EFI_HII_DEFAULT_CLASS_STANDARD, \r
-      EFI_IFR_TYPE_NUM_SIZE_16, \r
+      DefaultOpCodeHandle,\r
+      EFI_HII_DEFAULT_CLASS_STANDARD,\r
+      EFI_IFR_TYPE_NUM_SIZE_16,\r
       *Default++\r
       );\r
-  \r
+\r
     //\r
     // Create the string for oneof tag\r
     //\r
@@ -886,7 +886,7 @@ UpdateLegacyDeviceOrderPage (
       OptionsOpCodeHandle,\r
       DefaultOpCodeHandle //NULL //\r
       );\r
-      \r
+\r
     HiiFreeOpCodeHandle (DefaultOpCodeHandle);\r
   }\r
 \r
@@ -894,8 +894,8 @@ UpdateLegacyDeviceOrderPage (
     mLegacyBootOptionPrivate->HiiHandle,\r
     &mLegacyBootOptionGuid,\r
     LEGACY_ORDER_CHANGE_FORM_ID,\r
-    mLegacyStartOpCodeHandle, \r
-    mLegacyEndOpCodeHandle   \r
+    mLegacyStartOpCodeHandle,\r
+    mLegacyEndOpCodeHandle\r
     );\r
 \r
   HiiFreeOpCodeHandle (OptionsOpCodeHandle);\r
@@ -966,7 +966,7 @@ AdjustOptionValue (
     CurrentVal  = CurrentNVMap->LegacyBEV;\r
     Default     = mLegacyBootOptionPrivate->MaintainMapData->LastTimeNvData.LegacyBEV;\r
   }\r
-  \r
+\r
   //\r
   //  First, find the different position\r
   //  if there is change, it should be only one\r
@@ -1245,27 +1245,27 @@ GetLegacyOptionsOrder (
         LegacyDev = mLegacyBootOptionPrivate->MaintainMapData->InitialNvData.LegacyFD;\r
         OptionMenu = &LegacyFDMenu;\r
         break;\r
-      \r
+\r
       case BBS_HARDDISK:\r
         LegacyDev = mLegacyBootOptionPrivate->MaintainMapData->InitialNvData.LegacyHD;\r
         OptionMenu = &LegacyHDMenu;\r
         break;\r
-      \r
+\r
       case BBS_CDROM:\r
         LegacyDev = mLegacyBootOptionPrivate->MaintainMapData->InitialNvData.LegacyCD;\r
         OptionMenu = &LegacyCDMenu;\r
         break;\r
-      \r
+\r
       case BBS_EMBED_NETWORK:\r
         LegacyDev = mLegacyBootOptionPrivate->MaintainMapData->InitialNvData.LegacyNET;\r
         OptionMenu = &LegacyNETMenu;\r
         break;\r
-      \r
+\r
       case BBS_BEV_DEVICE:\r
         LegacyDev = mLegacyBootOptionPrivate->MaintainMapData->InitialNvData.LegacyBEV;\r
         OptionMenu = &LegacyBEVMenu;\r
         break;\r
-      \r
+\r
       case BBS_UNKNOWN:\r
       default:\r
         ASSERT (FALSE);\r
@@ -1337,7 +1337,7 @@ GetLegacyOptions (
   BEVNum  = 0;\r
 \r
   EfiBootManagerConnectAll ();\r
-  \r
+\r
   //\r
   // for better user experience\r
   // 1. User changes HD configuration (e.g.: unplug HDD), here we have a chance to remove the HDD boot option\r
@@ -1431,7 +1431,7 @@ LegacyBootMaintUiLibConstructor (
     //\r
     LegacyBootOptionData = AllocateZeroPool (sizeof (LEGACY_BOOT_OPTION_CALLBACK_DATA));\r
     ASSERT (LegacyBootOptionData != NULL);\r
-    \r
+\r
     LegacyBootOptionData->MaintainMapData = AllocateZeroPool (sizeof (LEGACY_BOOT_MAINTAIN_DATA));\r
     ASSERT (LegacyBootOptionData->MaintainMapData != NULL);\r
 \r
@@ -1499,7 +1499,7 @@ LegacyBootMaintUiLibDestructor (
                     NULL\r
                     );\r
     ASSERT_EFI_ERROR (Status);\r
-    \r
+\r
     HiiRemovePackages (mLegacyBootOptionPrivate->HiiHandle);\r
 \r
     FreePool (mLegacyBootOptionPrivate->MaintainMapData);\r