]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / GenericBdsLib / BdsBoot.c
index 9c2d592fc66a9c9adee2bf38be66636377c785ce..178679ffb8b688074b1d006b121e8ac4b48061e0 100644 (file)
@@ -43,12 +43,12 @@ BmEndOfBdsPerfCode (
 \r
 /**\r
   The constructor function register UNI strings into imageHandle.\r
-  \r
-  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. \r
+\r
+  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.\r
 \r
   @param  ImageHandle   The firmware allocated handle for the EFI image.\r
   @param  SystemTable   A pointer to the EFI System Table.\r
-  \r
+\r
   @retval EFI_SUCCESS   The constructor successfully added string package.\r
   @retval Other value   The constructor can't add string package.\r
 \r
@@ -432,7 +432,7 @@ BdsCreateLegacyBootOption (
                   );\r
 \r
   FreePool (Buffer);\r
-  \r
+\r
   Buffer = NULL;\r
 \r
   NewBootOrderList = AllocateZeroPool (*BootOrderListSize + sizeof (UINT16));\r
@@ -593,10 +593,10 @@ BdsDeleteAllInvalidLegacyBootOptions (
         return EFI_OUT_OF_RESOURCES;\r
       }\r
     }\r
-  \r
+\r
     //\r
     // Skip Non-Legacy boot option\r
-    // \r
+    //\r
     if (!BdsIsLegacyBootOption (BootOptionVar, &BbsEntry, &BbsIndex)) {\r
       if (BootOptionVar!= NULL) {\r
         FreePool (BootOptionVar);\r
@@ -803,7 +803,7 @@ BdsCreateOneLegacyBootOption (
 /**\r
   Add the legacy boot options from BBS table if they do not exist.\r
 \r
-  @retval EFI_SUCCESS          The boot options are added successfully \r
+  @retval EFI_SUCCESS          The boot options are added successfully\r
                                or they are already in boot options.\r
   @retval EFI_NOT_FOUND        No legacy boot options is found.\r
   @retval EFI_OUT_OF_RESOURCE  No enough memory.\r
@@ -953,7 +953,7 @@ BdsFillDevOrderBuf (
   @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 gEfiLegacyDevOrderVariableGuid is\r
                                  set correctly.\r
   @retval EFI_OUT_OF_RESOURCES   Memmory or storage is not enough.\r
@@ -1044,11 +1044,11 @@ BdsCreateDevOrder (
   DevOrderPtr->BbsType = BBS_HARDDISK;\r
   DevOrderPtr->Length  = (UINT16) (sizeof (UINT16) + HDCount * sizeof (UINT16));\r
   DevOrderPtr          = (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (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 *) BdsFillDevOrderBuf (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 *) BdsFillDevOrderBuf (BbsTable, BBS_EMBED_NETWORK, BbsCount, DevOrderPtr->Data);\r
@@ -1075,7 +1075,7 @@ BdsCreateDevOrder (
 }\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
@@ -1293,7 +1293,7 @@ BdsUpdateLegacyDevOrder (
     NETIndex++;\r
   }\r
   NewNETPtr = NewPtr->Data;\r
-  \r
+\r
   //\r
   // copy BEV\r
   //\r
@@ -1517,7 +1517,7 @@ PrintBbsTable (
   Set the boot priority for BBS entries based on boot option entry and boot order.\r
 \r
   @param  Entry             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
@@ -1719,7 +1719,7 @@ BdsLibDoLegacyBoot (
     Status = EfiCreateEventLegacyBootEx(\r
                TPL_NOTIFY,\r
                BmEndOfBdsPerfCode,\r
-               NULL, \r
+               NULL,\r
                &LegacyBootEvent\r
                );\r
     ASSERT_EFI_ERROR (Status);\r
@@ -1976,7 +1976,7 @@ BdsMatchUsbWwid (
 \r
 /**\r
   Find a USB device path which match the specified short-form device path start\r
-  with USB Class or USB WWID device path and load the boot file then return the \r
+  with USB Class or USB WWID device path and load the boot file then return the\r
   image handle. If ParentDevicePath is NULL, this function will search in all USB\r
   devices of the platform. If ParentDevicePath is not NULL,this function will only\r
   search in its child devices.\r
@@ -2133,7 +2133,7 @@ BdsFindUsbDevice (
 \r
 /**\r
   Expand USB Class or USB WWID device path node to be full device path of a USB\r
-  device in platform then load the boot file on this full device path and return the \r
+  device in platform then load the boot file on this full device path and return the\r
   image handle.\r
 \r
   This function support following 4 cases:\r
@@ -2365,9 +2365,9 @@ BdsLibBootViaBootOption (
     } else {\r
       DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Booting %S\n", Option->Description));\r
     }\r
-        \r
+\r
     DEBUG_CODE_END();\r
-  \r
+\r
     //\r
     // Report status code for OS Loader LoadImage.\r
     //\r
@@ -2421,7 +2421,7 @@ BdsLibBootViaBootOption (
     REPORT_STATUS_CODE (\r
       EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
       (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR)\r
-      );    \r
+      );\r
     goto Done;\r
   }\r
 \r
@@ -2690,7 +2690,7 @@ BdsExpandPartitionPartialDevicePathToFull (
 \r
         //\r
         // Here limit the device path instance number to 12, which is max number for a system support 3 IDE controller\r
-        // If the user try to boot many OS in different HDs or partitions, in theory, \r
+        // If the user try to boot many OS in different HDs or partitions, in theory,\r
         // the HD_BOOT_DEVICE_PATH_VARIABLE_NAME variable maybe become larger and larger.\r
         //\r
         InstanceNum = 0;\r
@@ -3214,7 +3214,7 @@ BdsLibEnumerateAllBootOption (
 \r
   //\r
   // Parse removable media followed by fixed media.\r
-  // The Removable[] array is used by the for-loop below to create removable media boot options \r
+  // The Removable[] array is used by the for-loop below to create removable media boot options\r
   // at first, and then to create fixed media boot options.\r
   //\r
   Removable[0]  = FALSE;\r
@@ -3629,7 +3629,7 @@ BdsLibGetBootableHandle (
   UpdatedDevicePath = DevicePath;\r
 \r
   //\r
-  // Enter to critical section to protect the acquired BlockIo instance \r
+  // Enter to critical section to protect the acquired BlockIo instance\r
   // from getting released due to the USB mass storage hotplug event\r
   //\r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
@@ -3653,10 +3653,10 @@ BdsLibGetBootableHandle (
     }\r
   } else {\r
     //\r
-    // For removable device boot option, its contained device path only point to the removable device handle, \r
-    // should make sure all its children handles (its child partion or media handles) are created and connected. \r
+    // For removable device boot option, its contained device path only point to the removable device handle,\r
+    // should make sure all its children handles (its child partion or media handles) are created and connected.\r
     //\r
-    gBS->ConnectController (Handle, NULL, NULL, TRUE); \r
+    gBS->ConnectController (Handle, NULL, NULL, TRUE);\r
     //\r
     // Get BlockIo protocol and check removable attribute\r
     //\r
@@ -4030,7 +4030,7 @@ BdsLibIsValidEFIBootOptDevicePathExt (
 \r
   //\r
   // Check if it's a valid boot option for network boot device.\r
-  // Check if there is EfiLoadFileProtocol installed. \r
+  // Check if there is EfiLoadFileProtocol installed.\r
   // If yes, that means there is a boot option for network.\r
   //\r
   Status = gBS->LocateDevicePath (\r
@@ -4068,7 +4068,7 @@ BdsLibIsValidEFIBootOptDevicePathExt (
       }\r
     } else {\r
       return TRUE;\r
-    }    \r
+    }\r
   }\r
 \r
   //\r