\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
UINTN Max;\r
\r
CurrentRow = 0;\r
- \r
+\r
// Need to call here to make sure Device Counts are valid\r
EblUpdateDeviceLists ();\r
\r
+ // Now we can print out the info...\r
Max = EfiGetDeviceCounts (EfiOpenFirmwareVolume);\r
if (Max != 0) {\r
AsciiPrint ("Firmware Volume Devices:\n");\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
\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
\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
}\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
/**\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
\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
\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
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
// * 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
UINTN Size;\r
UINTN Offset;\r
UINTN Chunk = FILE_COPY_CHUNK;\r
- \r
+\r
if (Argc < 3) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
Status = EfiRead(Source, Buffer, &Chunk);\r
if (EFI_ERROR(Status)) {\r
- AsciiPrint("Read file error\n");\r
+ AsciiPrint("Read file error %r\n", Status);\r
goto Exit;\r
}\r
\r
Status = EfiWrite(Destination, Buffer, &Chunk);\r
if (EFI_ERROR(Status)) {\r
- AsciiPrint("Write file error\n");\r
+ AsciiPrint("Write file error %r\n", Status);\r
goto Exit;\r
} \r
}\r
\r
Status = EfiRead(Source, Buffer, &Chunk);\r
if (EFI_ERROR(Status)) {\r
- AsciiPrint("Read file error\n");\r
+ AsciiPrint("Read file error %r\n", Status);\r
goto Exit;\r
}\r
\r
Status = EfiWrite(Destination, Buffer, &Chunk);\r
if (EFI_ERROR(Status)) {\r
- AsciiPrint("Write file error\n");\r
+ AsciiPrint("Write file error %r\n", Status);\r
goto Exit;\r
} \r
}\r
\r
+\r
Exit:\r
if (Source != NULL) {\r
Status = EfiClose(Source);\r
AsciiPrint("Source close error %r\n", Status);\r
}\r
}\r
- \r
if (Destination != NULL) {\r
Status = EfiClose(Destination);\r
if (EFI_ERROR(Status)) {\r