]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBm.c
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / LegacyBootManagerLib / LegacyBm.c
index 76902eced32598a93b8de993f61ae44a1f2923d8..2e6ada170aa1bf40db6f67b65640674c6d8f7294 100644 (file)
@@ -3,7 +3,7 @@
   and manage the legacy boot option, all legacy boot option is getting from\r
   the legacy BBS table.\r
 \r
-Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 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
@@ -237,7 +237,7 @@ LegacyBmFuzzyMatch (
       );\r
     if ((StrCmp (Description, BootOption->Description) == 0) && !BbsIndexUsed[BbsData->BbsIndex]) {\r
       //\r
-      // If devices with the same description string are connected, \r
+      // If devices with the same description string are connected,\r
       // the BbsIndex of the first device is returned for the other device also.\r
       // So, check if the BbsIndex is already being used, before assigning the BbsIndex.\r
       //\r
@@ -264,7 +264,7 @@ LegacyBmFuzzyMatch (
       );\r
     if ((StrCmp (Description, BootOption->Description) == 0) && !BbsIndexUsed[Index]) {\r
       //\r
-      // If devices with the same description string are connected, \r
+      // If devices with the same description string are connected,\r
       // the BbsIndex of the first device is assigned for the other device also.\r
       // So, check if the BbsIndex is already being used, before assigning the corrected BbsIndex.\r
       //\r
@@ -309,7 +309,7 @@ LegacyBmUpdateBbsIndex (
           ((LegacyDevOrder != NULL) && (*LegacyDevOrderSize != 0))\r
          );\r
 \r
-  for (Entry = LegacyDevOrder; \r
+  for (Entry = LegacyDevOrder;\r
        Entry < (LEGACY_DEV_ORDER_ENTRY *) ((UINT8 *) LegacyDevOrder + *LegacyDevOrderSize);\r
        Entry = (LEGACY_DEV_ORDER_ENTRY *) ((UINTN) Entry + sizeof (BBS_TYPE) + Entry->Length)\r
        ) {\r
@@ -321,8 +321,8 @@ LegacyBmUpdateBbsIndex (
             // Delete the old entry\r
             //\r
             CopyMem (\r
-              &Entry->Data[Index], \r
-              &Entry->Data[Index + 1], \r
+              &Entry->Data[Index],\r
+              &Entry->Data[Index + 1],\r
               (UINT8 *) LegacyDevOrder + *LegacyDevOrderSize - (UINT8 *) &Entry->Data[Index + 1]\r
               );\r
             Entry->Length       -= sizeof (UINT16);\r
@@ -531,7 +531,7 @@ LegacyBmCreateLegacyBootOption (
   if ((BootOption == NULL) || (BbsEntry == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   LegacyBmBuildLegacyDevNameString (BbsEntry, BbsIndex, sizeof (Description), Description);\r
 \r
   //\r
@@ -574,7 +574,7 @@ LegacyBmCreateLegacyBootOption (
              );\r
   FreePool (DevicePath);\r
   FreePool (OptionalData);\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -621,7 +621,7 @@ LegacyBmFillDevOrderBuf (
   @param BbsTable        The BBS table.\r
   @param BbsCount        The BBS Count.\r
 \r
-  @retval EFI_SUCCES             The buffer is created and the EFI variable named \r
+  @retval EFI_SUCCES             The buffer is created and the EFI variable named\r
                                  VAR_LEGACY_DEV_ORDER and EfiLegacyDevOrderGuid is\r
                                  set correctly.\r
   @retval EFI_OUT_OF_RESOURCES   Memmory or storage is not enough.\r
@@ -712,11 +712,11 @@ LegacyBmCreateDevOrder (
   DevOrderPtr->BbsType = BBS_HARDDISK;\r
   DevOrderPtr->Length  = (UINT16) (sizeof (UINT16) + HDCount * sizeof (UINT16));\r
   DevOrderPtr          = (LEGACY_DEV_ORDER_ENTRY *) LegacyBmFillDevOrderBuf (BbsTable, BBS_HARDDISK, BbsCount, DevOrderPtr->Data);\r
-  \r
+\r
   DevOrderPtr->BbsType = BBS_CDROM;\r
   DevOrderPtr->Length  = (UINT16) (sizeof (UINT16) + CDCount * sizeof (UINT16));\r
   DevOrderPtr          = (LEGACY_DEV_ORDER_ENTRY *) LegacyBmFillDevOrderBuf (BbsTable, BBS_CDROM, BbsCount, DevOrderPtr->Data);\r
-  \r
+\r
   DevOrderPtr->BbsType = BBS_EMBED_NETWORK;\r
   DevOrderPtr->Length  = (UINT16) (sizeof (UINT16) + NETCount * sizeof (UINT16));\r
   DevOrderPtr          = (LEGACY_DEV_ORDER_ENTRY *) LegacyBmFillDevOrderBuf (BbsTable, BBS_EMBED_NETWORK, BbsCount, DevOrderPtr->Data);\r
@@ -743,7 +743,7 @@ LegacyBmCreateDevOrder (
 }\r
 \r
 /**\r
-  Add the legacy boot devices from BBS table into \r
+  Add the legacy boot devices from BBS table into\r
   the legacy device boot order.\r
 \r
   @retval EFI_SUCCESS           The boot devices are added successfully.\r
@@ -944,7 +944,7 @@ LegacyBmUpdateDevOrder (
     NETIndex++;\r
   }\r
   NewNETPtr = NewPtr->Data;\r
-  \r
+\r
   //\r
   // copy BEV\r
   //\r
@@ -1164,7 +1164,7 @@ LegacyBmPrintBbsTable (
   Set the boot priority for BBS entries based on boot option entry and boot order.\r
 \r
   @param  BootOption            The boot option is to be checked for refresh BBS table.\r
-  \r
+\r
   @retval EFI_SUCCESS           The boot priority for BBS entries is refreshed successfully.\r
   @retval EFI_NOT_FOUND         BBS entries can't be found.\r
   @retval EFI_OUT_OF_RESOURCES  Failed to get the legacy device boot order.\r
@@ -1224,7 +1224,7 @@ LegacyBmRefreshBbsTableForBoot (
   //\r
   // boot priority always starts at 0\r
   //\r
-  Priority = 0;  \r
+  Priority = 0;\r
   if ((DevicePathType (BootOption->FilePath) == BBS_DEVICE_PATH) &&\r
       (DevicePathSubType (BootOption->FilePath) == BBS_BBS_DP)) {\r
     //\r
@@ -1255,7 +1255,7 @@ LegacyBmRefreshBbsTableForBoot (
         (DevicePathSubType (Option[Index].FilePath) != BBS_BBS_DP)) {\r
       continue;\r
     }\r
-    \r
+\r
     DevType = LegacyBmDeviceType (Option[Index].FilePath);\r
     for (DeviceTypeIndex = 0; DeviceTypeIndex < DeviceTypeCount; DeviceTypeIndex++) {\r
       if (DeviceType[DeviceTypeIndex] == DevType) {\r
@@ -1284,7 +1284,7 @@ LegacyBmRefreshBbsTableForBoot (
   DEBUG_CODE_BEGIN();\r
     LegacyBmPrintBbsTable (LocalBbsTable, BbsCount);\r
   DEBUG_CODE_END();\r
-  \r
+\r
   return Status;\r
 }\r
 \r
@@ -1459,7 +1459,7 @@ LegacyBmRefreshAllBootOption (
   PERF_START (NULL, "LegacyBootOptionEnum", "BDS", 0);\r
 \r
   //\r
-  // Before enumerating the legacy boot option, we need to dispatch all the legacy option roms \r
+  // Before enumerating the legacy boot option, we need to dispatch all the legacy option roms\r
   // to ensure the GetBbsInfo() counts all the legacy devices.\r
   //\r
   gBS->LocateHandleBuffer (\r
@@ -1481,7 +1481,7 @@ LegacyBmRefreshAllBootOption (
     for (Index = 0; Index < HandleCount; Index++) {\r
       //\r
       // Start the thunk driver so that the legacy option rom gets dispatched.\r
-      // Note: We don't directly call InstallPciRom because some thunk drivers \r
+      // Note: We don't directly call InstallPciRom because some thunk drivers\r
       // (e.g. BlockIo thunk driver) depend on the immediate result after dispatching\r
       //\r
       Status = LegacyBios->CheckPciRom (\r