]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Ebl/EfiDevice.c
EmbeddedPkg: Fix mispellings
[mirror_edk2.git] / EmbeddedPkg / Ebl / EfiDevice.c
index 80dcfcb5cc2c26373c567465301b5aae4c0cf3da..dfdbc3fe789a69c1185ca16544c3bef9f9ef24aa 100644 (file)
@@ -196,7 +196,7 @@ EblPrintLoadFileInfo (
 \r
   @param  Argc   Number of command arguments in Argv\r
   @param  Argv   Array of strings that represent the parsed command line. \r
-                 Argv[0] is the comamnd name\r
+                 Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
 \r
@@ -207,44 +207,16 @@ EblDeviceCmd (
   IN CHAR8  **Argv\r
   )\r
 {\r
-  EFI_STATUS    Status;\r
   UINTN         Index;\r
   UINTN         CurrentRow;\r
   UINTN         Max;\r
-  EFI_OPEN_FILE *File;\r
 \r
   CurrentRow = 0;\r
 \r
   // Need to call here to make sure Device Counts are valid\r
   EblUpdateDeviceLists ();\r
 \r
-  //\r
-  // Probe for media insertion/removal in removable media devices\r
-  //\r
-  Max = EfiGetDeviceCounts (EfiOpenBlockIo);\r
-  if (Max != 0) {\r
-    for (Index = 0; Index < Max; Index++) {\r
-      File = EfiDeviceOpenByType (EfiOpenBlockIo, Index);\r
-      if (File != NULL) {\r
-        if (File->FsBlockIoMedia->RemovableMedia) {\r
-          if (File->FsBlockIoMedia->MediaPresent) {\r
-            // Probe to see if media is present\r
-            Status = File->FsBlockIo->ReadBlocks (File->FsBlockIo, File->FsBlockIo->Media->MediaId, (EFI_LBA)0, 0, NULL);\r
-            if (Status == EFI_NO_MEDIA) {\r
-              gBS->DisconnectController (File->EfiHandle, NULL, NULL);\r
-            }\r
-          } else {\r
-            // Probe for media insertion and connect partition and filesystem drivers if needed\r
-            gBS->ConnectController (File->EfiHandle, NULL, NULL, TRUE);\r
-          }\r
-        }\r
-        EfiClose (File);\r
-      }\r
-    }\r
-  }\r
-\r
   // Now we can print out the info...\r
-\r
   Max = EfiGetDeviceCounts (EfiOpenFirmwareVolume);\r
   if (Max != 0) {\r
     AsciiPrint ("Firmware Volume Devices:\n");\r
@@ -307,7 +279,7 @@ EblDeviceCmd (
 \r
   @param  Argc   Number of command arguments in Argv\r
   @param  Argv   Array of strings that represent the parsed command line. \r
-                 Argv[0] is the comamnd name\r
+                 Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
 \r
@@ -381,7 +353,7 @@ EblStartCmd (
 \r
 /**\r
   Load a Firmware Volume (FV) into memory from a device. This causes drivers in\r
-  the FV to be dispatched if the dependancies of the drivers are met.\r
+  the FV to be dispatched if the dependencies of the drivers are met.\r
   \r
   Argv[0] - "loadfv"\r
   Argv[1] - device name and path\r
@@ -392,7 +364,7 @@ EblStartCmd (
 \r
   @param  Argc   Number of command arguments in Argv\r
   @param  Argv   Array of strings that represent the parsed command line. \r
-                 Argv[0] is the comamnd name\r
+                 Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
 \r
@@ -431,7 +403,9 @@ EblLoadFvCmd (
     }\r
       \r
     Status = gDS->ProcessFirmwareVolume (FvStart, FvSize, &FvHandle);\r
-    FreePool (FvStart);\r
+    if (EFI_ERROR (Status)) {\r
+      FreePool (FvStart);\r
+    } \r
   }\r
   return Status;\r
 }\r
@@ -440,13 +414,13 @@ EblLoadFvCmd (
 /**\r
   Perform an EFI connect to connect devices that follow the EFI driver model. \r
   If it is a PI system also call the dispatcher in case a new FV was made\r
-  availible by one of the connect EFI drivers (this is not a common case).\r
+  available by one of the connect EFI drivers (this is not a common case).\r
   \r
   Argv[0] - "connect"\r
 \r
   @param  Argc   Number of command arguments in Argv\r
   @param  Argv   Array of strings that represent the parsed command line. \r
-                 Argv[0] is the comamnd name\r
+                 Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
 \r
@@ -568,7 +542,7 @@ CHAR8 *gMemMapType[] = {
 \r
   @param  Argc   Number of command arguments in Argv\r
   @param  Argv   Array of strings that represent the parsed command line. \r
-                 Argv[0] is the comamnd name\r
+                 Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
 \r
@@ -654,7 +628,7 @@ EblMemMapCmd (
 \r
 \r
 /**\r
-  Load a file into memory and optionally jump to it. A load addres can be \r
+  Load a file into memory and optionally jump to it. A load address can be\r
   specified or automatically allocated. A quoted command line can optionally\r
   be passed into the image. \r
 \r
@@ -670,14 +644,14 @@ EblMemMapCmd (
     in "EblCmdX Arg2 Arg3 Arg4" as the arguments.\r
 \r
   go fv0:\EblCmdX  *  0x10 "EblCmdX Arg2 Arg3 Arg4"; - load EblCmdX from FS0 \r
-    to location allocated by this comamnd and call the entry point at offset 0x10 \r
+    to location allocated by this command and call the entry point at offset 0x10\r
     passing in "EblCmdX Arg2 Arg3 Arg4" as the arguments.\r
 \r
   go fv1:\EblCmdX  0x10000; Load EblCmdX to address 0x10000 and return\r
 \r
   @param  Argc   Number of command arguments in Argv\r
   @param  Argv   Array of strings that represent the parsed command line. \r
-                 Argv[0] is the comamnd name\r
+                 Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
 \r
@@ -713,7 +687,7 @@ EblGoCmd (
     // * Means allocate the buffer\r
     Status = EfiReadAllocatePool (File, &Address, &Size);\r
     \r
-    // EntryPoint is relatvie to the start of the image \r
+    // EntryPoint is relative to the start of the image\r
     EntryPoint = (EBL_COMMMAND)((UINTN)EntryPoint + (UINTN)Address);\r
 \r
   } else {\r