/** @file\r
- Glue code that contains the EFI entry point and converts it to an EBL \r
+ Glue code that contains the EFI entry point and converts it to an EBL\r
ASCII Argc, Argv sytle entry point\r
\r
\r
\r
**/\r
\r
-#define CMD_SEPERATOR ';'\r
+#include "Ebl.h"\r
+\r
+#define CMD_SEPARATOR ';'\r
#define MAX_ARGS 32\r
\r
EFI_STATUS\r
\r
/**\r
Parse the CmdLine and break it up into Argc (arg count) and Argv (array of\r
- pointers to each argument). The Cmd buffer is altered and seperators are \r
+ pointers to each argument). The Cmd buffer is altered and separators are\r
converted to string terminators. This allows Argv to point into CmdLine.\r
A CmdLine can support multiple commands. The next command in the command line\r
is returned if it exists.\r
return;\r
}\r
\r
- // Walk a single command line. A CMD_SEPERATOR allows mult commands on a single line\r
+ // Walk a single command line. A CMD_SEPARATOR allows multiple commands on a single line\r
InQuote = FALSE;\r
LookingForArg = TRUE;\r
- for (Char = CmdLine, Arg = 0, Index = 0; *Char != '\0' && *Char != CMD_SEPERATOR; Char++, Index++) {\r
- // Perform any text coversion here\r
+ for (Char = CmdLine, Arg = 0, Index = 0; *Char != '\0' && *Char != CMD_SEPARATOR; Char++, Index++) {\r
+ // Perform any text conversion here\r
if (*Char == '\t') {\r
// TAB to space\r
*Char = ' ';\r
}\r
\r
if (LookingForArg) {\r
- // Look for the beging of an Argv[] entry\r
+ // Look for the beginning of an Argv[] entry\r
if (*Char == '"') {\r
Argv[Arg++] = ++Char;\r
LookingForArg = FALSE;\r
} else if (*Char != ' ') {\r
Argv[Arg++] = Char;\r
LookingForArg = FALSE;\r
- } \r
+ }\r
} else {\r
// Looking for the terminator of an Argv[] entry\r
if ((InQuote && (*Char == '"')) || (!InQuote && (*Char == ' '))) {\r
\r
*Argc = Arg;\r
\r
- if (*Char == CMD_SEPERATOR) {\r
- // Replace the command delimeter with null\r
+ if (*Char == CMD_SEPARATOR) {\r
+ // Replace the command delimiter with null\r
*Char = '\0';\r
}\r
\r
return;\r
}\r
- \r
+\r
\r
\r
\r
/**\r
- Embedded Boot Loader (EBL) - A simple EFI command line application for embedded \r
- devices. PcdEmbeddedAutomaticBootCommand is a complied in commnad line that\r
- gets executed automatically. The ; seperator allows multiple commands \r
+ Embedded Boot Loader (EBL) - A simple EFI command line application for embedded\r
+ devices. PcdEmbeddedAutomaticBootCommand is a complied in command line that\r
+ gets executed automatically. The ; separator allows multiple commands\r
for each command line.\r
\r
@param ImageHandle EFI ImageHandle for this application.\r
@param SystemTable EFI system table\r
\r
- @return EFI status of the applicaiton\r
+ @return EFI status of the application\r
\r
**/\r
EFI_STATUS\r
EdkExternCmdEntry (\r
IN EFI_HANDLE ImageHandle,\r
IN EFI_SYSTEM_TABLE *SystemTable\r
- ) \r
+ )\r
{\r
EFI_STATUS Status;\r
EFI_LOADED_IMAGE_PROTOCOL *ImageInfo;\r
if (EFI_ERROR (Status)) {\r
Argc = 0;\r
} else {\r
- // Looks like valid commands were passed in. \r
+ // Looks like valid commands were passed in.\r
ParseArguments (ImageInfo->LoadOptions, ImageInfo->LoadOptionsSize, &Argc, Argv);\r
}\r
- \r
+\r
return EblMain (Argc, Argv);\r
}\r
\r