]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/EblExternCmd/EntryPointGlue.c
OvmfPkg/QemuFlashFvbServicesRuntimeDxe: correct NumOfLba vararg type in EraseBlocks()
[mirror_edk2.git] / EmbeddedPkg / EblExternCmd / EntryPointGlue.c
index 1e26fb51597f29d2866211259e772acc66c5fb2d..d0e549bdc189eefc2ae0b2cb7b73fc4f61119de5 100644 (file)
@@ -1,12 +1,12 @@
 /** @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
-  Copyright (c) 2007, Intel Corporation<BR>\r
-  Portions copyright (c) 2008-2009, Apple Inc. All rights reserved.\r
+  Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
+  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
 \r
-  All rights reserved. This program and the accompanying materials\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
@@ -17,7 +17,9 @@
 \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
@@ -35,7 +37,7 @@ EblMain (
 \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
@@ -67,18 +69,18 @@ ParseArguments (
     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
@@ -86,7 +88,7 @@ ParseArguments (
       } 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
@@ -103,27 +105,27 @@ ParseArguments (
 \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
@@ -131,7 +133,7 @@ EFIAPI
 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
@@ -142,10 +144,10 @@ EdkExternCmdEntry (
   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