]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/GenericBdsLib/BdsBoot.c
Clean up GenericBdsLib library Instance.
[mirror_edk2.git] / MdeModulePkg / Library / GenericBdsLib / BdsBoot.c
index 6a1c92139f7ee25213eb94c7746ec4bfc3d56d2b..faa371b7b72602101b233c9422df2cdb25a7e39f 100644 (file)
@@ -218,7 +218,7 @@ BdsLibBootViaBootOption (
     //  machinename is ia32, ia64, x64, ...\r
     //\r
     FilePath = FileDevicePath (Handle, DEFAULT_REMOVABLE_FILE_NAME);\r
-    if (FilePath) {\r
+    if (FilePath != NULL) {\r
       Status = gBS->LoadImage (\r
                       TRUE,\r
                       mBdsImageHandle,\r
@@ -582,7 +582,7 @@ MatchPartitionDevicePathNode (
 \r
 \r
 /**\r
-  Delete the boot option associated with the handle passed in\r
+  Delete the boot option associated with the handle passed in.\r
 \r
   @param  Handle                 The handle which present the device path to create\r
                                  boot option\r
@@ -944,7 +944,7 @@ BdsLibEnumerateAllBootOption (
     }\r
   }\r
 \r
-  if (NumberBlockIoHandles) {\r
+  if (NumberBlockIoHandles != 0) {\r
     gBS->FreePool (BlockIoHandles);\r
   }\r
 \r
@@ -1006,7 +1006,7 @@ BdsLibEnumerateAllBootOption (
     }\r
   }\r
 \r
-  if (NumberFileSystemHandles) {\r
+  if (NumberFileSystemHandles != 0) {\r
     gBS->FreePool (FileSystemHandles);\r
   }\r
 \r
@@ -1029,7 +1029,7 @@ BdsLibEnumerateAllBootOption (
     BdsLibBuildOptionFromHandle (SimpleNetworkHandles[Index], BdsBootOptionList, Buffer);\r
   }\r
 \r
-  if (NumberSimpleNetworkHandles) {\r
+  if (NumberSimpleNetworkHandles != 0) {\r
     gBS->FreePool (SimpleNetworkHandles);\r
   }\r
 \r
@@ -1083,7 +1083,7 @@ BdsLibEnumerateAllBootOption (
     BdsLibBuildOptionFromShell (FvHandleBuffer[Index], BdsBootOptionList);\r
   }\r
 \r
-  if (FvHandleCount) {\r
+  if (FvHandleCount != 0) {\r
     gBS->FreePool (FvHandleBuffer);\r
   }\r
   //\r
@@ -1098,14 +1098,13 @@ BdsLibEnumerateAllBootOption (
 \r
 \r
 /**\r
-  Build the boot option with the handle parsed in\r
+  Build the boot option with the handle parsed in.\r
 \r
   @param  Handle                 The handle which present the device path to create\r
                                  boot option\r
   @param  BdsBootOptionList      The header of the link list which indexed all\r
                                  current boot options\r
-\r
-  @return VOID\r
+  @param  String                 Boot option name.\r
 \r
 **/\r
 VOID\r
@@ -1128,15 +1127,13 @@ BdsLibBuildOptionFromHandle (
 \r
 \r
 /**\r
-  Build the on flash shell boot option with the handle parsed in\r
+  Build the on flash shell boot option with the handle parsed in.\r
 \r
   @param  Handle                 The handle which present the device path to create\r
                                  on flash shell boot option\r
   @param  BdsBootOptionList      The header of the link list which indexed all\r
                                  current boot options\r
 \r
-  @return None\r
-\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -1459,7 +1456,7 @@ BdsLibNetworkBootWithMediaPresent (
 \r
 \r
 /**\r
-  For a bootable Device path, return its boot type\r
+  For a bootable Device path, return its boot type.\r
 \r
   @param  DevicePath                      The bootable device Path to check\r
 \r
@@ -1547,8 +1544,8 @@ BdsGetBootTypeFromDevicePath (
   Check whether the Device path in a boot option point to a valide bootable device,\r
   And if CheckMedia is true, check the device is ready to boot now.\r
 \r
-  DevPath -- the Device path in a boot option\r
-  CheckMedia -- if true, check the device is ready to boot now.\r
+  @param DevPath -- the Device path in a boot option\r
+  @param CheckMedia -- if true, check the device is ready to boot now.\r
 \r
   @return TRUE      -- the Device path  is valide\r
   @return FALSE   -- the Device path  is invalide .\r