]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Ebl/Command.c
ARM Packages: Removed trailing spaces
[mirror_edk2.git] / EmbeddedPkg / Ebl / Command.c
index 78ddcd19367e20a57e2310a914fc981424ceb846..7c00bcae85748505b4d02fe8fed0a40858cf2088 100644 (file)
@@ -32,7 +32,7 @@ EBL_COMMAND_TABLE *mCmdTable[EBL_MAX_COMMAND_COUNT];
 \r
   @param  chr   one Ascii character\r
 \r
-  @return The uppercase value of Ascii character \r
+  @return The uppercase value of Ascii character\r
 \r
 **/\r
 STATIC\r
@@ -55,11 +55,11 @@ AsciiToUpper (
   FirstString is identical to SecondString, then 0 is returned. Otherwise, the\r
   value returned is the first mismatched Unicode character in SecondString\r
   subtracted from the first mismatched Unicode character in FirstString.\r
-  \r
-  @param  FirstString   Pointer to a Null-terminated ASCII string.  \r
+\r
+  @param  FirstString   Pointer to a Null-terminated ASCII string.\r
   @param  SecondString  Pointer to a Null-terminated ASCII string.\r
   @param  Length        Max length to compare.\r
-  \r
+\r
   @retval 0   FirstString is identical to SecondString using case insensitive\r
               comparisons.\r
   @retval !=0 FirstString is not identical to SecondString using case\r
@@ -85,15 +85,15 @@ AsciiStrniCmp (
     SecondString++;\r
     Length--;\r
   }\r
-  \r
+\r
   return AsciiToUpper (*FirstString) - AsciiToUpper (*SecondString);\r
 }\r
 \r
 \r
 \r
 /**\r
-  Add a command to the mCmdTable. If there is no free space in the command \r
-  table ASSERT. The mCmdTable is maintained in alphabetical order and the \r
+  Add a command to the mCmdTable. If there is no free space in the command\r
+  table ASSERT. The mCmdTable is maintained in alphabetical order and the\r
   new entry is inserted into its sorted position.\r
 \r
   @param  Entry   Command Entry to add to the CmdTable\r
@@ -124,7 +124,7 @@ EblAddCommand (
       if (AsciiStriCmp (mCmdTable[Count - 1]->Name, Entry->Name) <= 0) {\r
         break;\r
       }\r
-      \r
+\r
       mCmdTable[Count] = mCmdTable[Count - 1];\r
     }\r
     mCmdTable[Count] = (EBL_COMMAND_TABLE *)Entry;\r
@@ -135,7 +135,7 @@ EblAddCommand (
 \r
 \r
 /**\r
-  Add an set of commands to the command table. Most commonly used on static \r
+  Add an set of commands to the command table. Most commonly used on static\r
   array of commands.\r
 \r
   @param  EntryArray   Pointer to array of command entries\r
@@ -167,7 +167,7 @@ EBL_ADD_COMMAND_PROTOCOL gEblAddCommand = {
 \r
 \r
 /**\r
-  Return the best matching command for the passed in command name. The match \r
+  Return the best matching command for the passed in command name. The match\r
   does not have to be exact, it just needs to be unique. This enables commands\r
   to be shortened to the smallest set of starting characters that is unique.\r
 \r
@@ -193,9 +193,9 @@ EblGetCommand (
   if (Str != NULL) {\r
     // If the command includes a trailing . command extension skip it for the match.\r
     // Example: hexdump.4\r
-    Length = (UINTN)(Str - CommandName); \r
+    Length = (UINTN)(Str - CommandName);\r
   }\r
-  \r
+\r
   for (Index = 0, BestMatchCount = 0, Match = NULL; Index < mCmdTableNextFreeIndex; Index++) {\r
     if (AsciiStriCmp (mCmdTable[Index]->Name,  CommandName) == 0) {\r
       // match a command exactly\r
@@ -226,30 +226,30 @@ CountNewLines (
   )\r
 {\r
   UINTN Count;\r
-  \r
+\r
   if (Str == NULL) {\r
     return 0;\r
   }\r
-  \r
+\r
   for (Count = 0; *Str != '\0'; Str++) {\r
     if (Str[Count] == '\n') {\r
       Count++;\r
     }\r
   }\r
-  \r
+\r
   return Count;\r
 }\r
 \r
 \r
 /**\r
-  List out help information on all the commands or print extended information \r
+  List out help information on all the commands or print extended information\r
   about a specific passed in command.\r
 \r
   Argv[0] - "help"\r
   Argv[1] - Command to display help about\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \r
+  @param  Argv   Array of strings that represent the parsed command line.\r
                  Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
@@ -281,7 +281,7 @@ EblHelpCmd (
       }\r
     }\r
   } else if (Argv[1] != NULL) {\r
-    // Print specific help \r
+    // Print specific help\r
     for (Index = 0, CurrentRow = 0; Index < mCmdTableNextFreeIndex; Index++) {\r
       if (AsciiStriCmp (Argv[1], mCmdTable[Index]->Name) == 0) {\r
         Ptr = (mCmdTable[Index]->Help == NULL) ? mCmdTable[Index]->HelpSummary : mCmdTable[Index]->Help;\r
@@ -306,7 +306,7 @@ EblHelpCmd (
   Argv[0] - "exit"\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \r
+  @param  Argv   Array of strings that represent the parsed command line.\r
                  Argv[0] is the command name\r
 \r
   @return EFI_ABORTED\r
@@ -326,14 +326,14 @@ EblExitCmd (
   UINT32                  DescriptorVersion;\r
   UINTN                   Pages;\r
 \r
-  if (Argc > 1) { \r
+  if (Argc > 1) {\r
     if (AsciiStriCmp (Argv[1], "efi") != 0) {\r
       return EFI_ABORTED;\r
     }\r
   } else if (Argc == 1) {\r
     return EFI_ABORTED;\r
   }\r
-  \r
+\r
   MemoryMap = NULL;\r
   MemoryMapSize = 0;\r
   do {\r
@@ -348,7 +348,7 @@ EblExitCmd (
 \r
       Pages = EFI_SIZE_TO_PAGES (MemoryMapSize) + 1;\r
       MemoryMap = AllocatePages (Pages);\r
-    \r
+\r
       //\r
       // Get System MemoryMap\r
       //\r
@@ -375,9 +375,9 @@ EblExitCmd (
   // At this point it is very dangerous to do things EFI as most of EFI is now gone.\r
   // This command is useful if you are working with a debugger as it will shutdown\r
   // DMA and other things that could break a soft resets.\r
-  //  \r
+  //\r
   CpuDeadLoop ();\r
-  \r
+\r
   // Should never get here, but makes the compiler happy\r
   return EFI_ABORTED;\r
 }\r
@@ -385,8 +385,8 @@ EblExitCmd (
 \r
 /**\r
   Update the screen by decrementing the timeout value.\r
-  This AsciiPrint has to match the AsciiPrint in \r
-  EblPauseCmd. \r
+  This AsciiPrint has to match the AsciiPrint in\r
+  EblPauseCmd.\r
 \r
   @param  ElaspedTime   Current timeout value remaining\r
 \r
@@ -410,7 +410,7 @@ EblPauseCallback (
   Argv[1] - timeout value is decimal seconds\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \r
+  @param  Argv   Array of strings that represent the parsed command line.\r
                  Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS  Timeout expired with no input\r
@@ -445,7 +445,7 @@ EblPauseCmd (
   Argv[0] - "break"\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \r
+  @param  Argv   Array of strings that represent the parsed command line.\r
                  Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
@@ -471,7 +471,7 @@ EblBreakPointCmd (
   Argv[1] - warm or shutdown reset type\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \r
+  @param  Argv   Array of strings that represent the parsed command line.\r
                  Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
@@ -496,7 +496,7 @@ EblResetCmd (
     case 's':\r
       ResetType = EfiResetShutdown;\r
     }\r
-  } \r
+  }\r
 \r
   gRT->ResetSystem (ResetType, EFI_SUCCESS, 0, NULL);\r
   return EFI_SUCCESS;\r
@@ -511,7 +511,7 @@ EblResetCmd (
   Argv[1] - on or off\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \r
+  @param  Argv   Array of strings that represent the parsed command line.\r
                  Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
@@ -524,7 +524,7 @@ EblPageCmd (
   )\r
 {\r
   if (Argc <= 1) {\r
-    // toggle setting   \r
+    // toggle setting\r
     gPageBreak = (gPageBreak) ? FALSE : TRUE;\r
   } else {\r
     // use argv to set the value\r
@@ -581,7 +581,7 @@ GetBytes (
   }\r
   if (Bytes >= 2) {\r
     Result = (Result << 8) + *Address++;\r
-  }  \r
+  }\r
   if (Bytes >= 3) {\r
     Result = (Result << 8) + *Address++;\r
   }\r
@@ -611,7 +611,7 @@ OutputData (
     AsciiPrint ("%08x: ", Offset);\r
     for (Line = 0; (Line < 0x10) && (Address < EndAddress);) {\r
       Bytes = EndAddress - Address;\r
-            \r
+\r
       switch (Width) {\r
         case 4:\r
           if (Bytes >= 4) {\r
@@ -667,7 +667,7 @@ OutputData (
       Blanks[Spaces] = '\0';\r
 \r
       AsciiPrint(Blanks);\r
-      \r
+\r
       Blanks[Spaces] = ' ';\r
     }\r
 \r
@@ -682,15 +682,15 @@ OutputData (
   if (Length % Width != 0) {\r
     AsciiPrint ("%08x\n", Offset);\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
 \r
 /**\r
   See if command contains .# where # is a number. Return # as the Width\r
-  or 1 as the default Width for commands. \r
-  \r
+  or 1 as the default Width for commands.\r
+\r
   Example hexdump.4 returns a width of 4.\r
 \r
   @param  Argv   Argv[0] is the command name\r
@@ -706,7 +706,7 @@ WidthFromCommandName (
 {\r
   CHAR8         *Str;\r
   UINTN         Width;\r
-  \r
+\r
   //Hexdump.2 HexDump.4 mean use a different width\r
   Str = AsciiStrStr (Argv, ".");\r
   if (Str != NULL) {\r
@@ -728,13 +728,13 @@ WidthFromCommandName (
   Toggle page break global. This turns on and off prompting to Quit or hit any\r
   key to continue when a command is about to scroll the screen with its output\r
 \r
-  Argv[0] - "hexdump"[.#]  # is optional 1,2, or 4 for width  \r
-  Argv[1] - Device or File to dump. \r
+  Argv[0] - "hexdump"[.#]  # is optional 1,2, or 4 for width\r
+  Argv[1] - Device or File to dump.\r
   Argv[2] - Optional offset to start dumping\r
   Argv[3] - Optional number of bytes to dump\r
 \r
   @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line. \r
+  @param  Argv   Array of strings that represent the parsed command line.\r
                  Argv[0] is the command name\r
 \r
   @return EFI_SUCCESS\r
@@ -757,7 +757,7 @@ EblHexdumpCmd (
   if ((Argc < 2) || (Argc > 4)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   Width = WidthFromCommandName (Argv[0], 1);\r
   if ((Width != 1) && (Width != 2) && (Width != 4)) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -778,13 +778,13 @@ EblHexdumpCmd (
       // Make sure size includes the part of the file we have skipped\r
       Size += Offset;\r
     }\r
-  } \r
+  }\r
 \r
   Status = EfiSeek (File, Offset, EfiSeekStart);\r
   if (EFI_ERROR (Status)) {\r
     goto Exit;\r
   }\r
-  \r
+\r
   for (; Offset + HEXDUMP_CHUNK <= Size; Offset += Chunk) {\r
     Chunk = HEXDUMP_CHUNK;\r
     Status = EfiRead (File, Location, &Chunk);\r
@@ -801,7 +801,7 @@ EblHexdumpCmd (
       goto Exit;\r
     }\r
   }\r
-  \r
+\r
   // Any left over?\r
   if (Offset < Size) {\r
     Chunk = Size - Offset;\r
@@ -894,7 +894,7 @@ EblInitializeCmdTable (
 {\r
 \r
   EblAddCommands (mCmdTemplate, sizeof (mCmdTemplate)/sizeof (EBL_COMMAND_TABLE));\r
-  \r
+\r
   gBS->InstallProtocolInterface (\r
         &gExternalCmdHandle,\r
         &gEfiEblAddCommandProtocolGuid,\r