]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/Shell/ShellProtocol.c
ShellPkg: Clean up source files
[mirror_edk2.git] / ShellPkg / Application / Shell / ShellProtocol.c
index d8b1e065e00a05243b6ece0ff1cf4e4ba01d0162..f2ca2029e368f61cb17e77b7c9d7fbc919a4c177 100644 (file)
@@ -4,7 +4,7 @@
 \r
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
   (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\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
@@ -1422,7 +1422,7 @@ EfiShellEnablePageBreak (
                                 variables with the format 'x=y', where x is the\r
                                 environment variable name and y is the value. If this\r
                                 is NULL, then the current shell environment is used.\r
-                            \r
+\r
   @param[out] StartImageStatus  Returned status from gBS->StartImage.\r
 \r
   @retval EFI_SUCCESS       The command executed successfully. The  status code\r
@@ -1460,7 +1460,7 @@ InternalShellExecuteDevicePath(
   ZeroMem(&ShellParamsProtocol, sizeof(EFI_SHELL_PARAMETERS_PROTOCOL));\r
 \r
   NewHandle = NULL;\r
-  \r
+\r
   NewCmdLine = AllocateCopyPool (StrSize (CommandLine), CommandLine);\r
   if (NewCmdLine == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -1505,8 +1505,8 @@ InternalShellExecuteDevicePath(
     //\r
     if (LoadedImage->ImageCodeType != EfiLoaderCode){\r
       ShellPrintHiiEx(\r
-        -1, \r
-        -1, \r
+        -1,\r
+        -1,\r
         NULL,\r
         STRING_TOKEN (STR_SHELL_IMAGE_NOT_APP),\r
         ShellInfoObject.HiiHandle\r
@@ -1630,7 +1630,7 @@ FreeAlloc:
                                 variables with the format 'x=y', where x is the\r
                                 environment variable name and y is the value. If this\r
                                 is NULL, then the current shell environment is used.\r
-                \r
+\r
   @param[out] StartImageStatus  Returned status from the command line.\r
 \r
   @retval EFI_SUCCESS       The command executed successfully. The  status code\r
@@ -2210,7 +2210,7 @@ EfiShellGetGuidFromName(
   if (Guid == NULL || GuidName == NULL) {\r
     return (EFI_INVALID_PARAMETER);\r
   }\r
\r
+\r
   Status = GetGuidFromStringName(GuidName, NULL, &NewGuid);\r
 \r
   if (!EFI_ERROR(Status)) {\r
@@ -2762,8 +2762,8 @@ EfiShellGetEnvEx(
       ; Node = (ENV_VAR_LIST*)GetNextNode(&gShellEnvVarList.Link, &Node->Link)\r
      ){\r
       ASSERT(Node->Key != NULL);\r
-      StrCpyS( CurrentWriteLocation, \r
-                (Size)/sizeof(CHAR16) - (CurrentWriteLocation - ((CHAR16*)Buffer)), \r
+      StrCpyS( CurrentWriteLocation,\r
+                (Size)/sizeof(CHAR16) - (CurrentWriteLocation - ((CHAR16*)Buffer)),\r
                 Node->Key\r
                 );\r
       CurrentWriteLocation += StrLen(CurrentWriteLocation) + 1;\r
@@ -3233,9 +3233,9 @@ EfiShellGetHelpText(
         return EFI_OUT_OF_RESOURCES;\r
       }\r
 \r
-      StrnCpyS( FixCommand, \r
-                (StrSize(Command) - 4 * sizeof (CHAR16))/sizeof(CHAR16), \r
-                Command, \r
+      StrnCpyS( FixCommand,\r
+                (StrSize(Command) - 4 * sizeof (CHAR16))/sizeof(CHAR16),\r
+                Command,\r
                 StrLen(Command)-4\r
                 );\r
       Status = ProcessManFile(FixCommand, FixCommand, Sections, NULL, HelpText);\r
@@ -3295,7 +3295,7 @@ InternalEfiShellGetListAlias(
   VOID\r
   )\r
 {\r
-  \r
+\r
   EFI_STATUS        Status;\r
   EFI_GUID          Guid;\r
   CHAR16            *VariableName;\r
@@ -3330,17 +3330,17 @@ InternalEfiShellGetListAlias(
         RetVal = NULL;\r
         break;\r
       }\r
-      \r
+\r
       NameSize = NameBufferSize;\r
       Status = gRT->GetNextVariableName(&NameSize, VariableName, &Guid);\r
     }\r
-    \r
+\r
     if (EFI_ERROR (Status)) {\r
       SHELL_FREE_NON_NULL(RetVal);\r
       RetVal = NULL;\r
       break;\r
     }\r
-    \r
+\r
     if (CompareGuid(&Guid, &gShellAliasGuid)){\r
       ASSERT((RetVal == NULL && RetSize == 0) || (RetVal != NULL));\r
       RetVal = StrnCatGrow(&RetVal, &RetSize, VariableName, 0);\r
@@ -3355,10 +3355,10 @@ InternalEfiShellGetListAlias(
 /**\r
   Convert a null-terminated unicode string, in-place, to all lowercase.\r
   Then return it.\r
-  \r
+\r
   @param  Str    The null-terminated string to be converted to all lowercase.\r
-  \r
-  @return        The null-terminated string converted into all lowercase.  \r
+\r
+  @return        The null-terminated string converted into all lowercase.\r
 **/\r
 CHAR16 *\r
 ToLower (\r
@@ -3385,7 +3385,7 @@ ToLower (
   @param[out] Volatile          upon return of a single command if TRUE indicates\r
                                 this is stored in a volatile fashion.  FALSE otherwise.\r
 \r
-  @return                              If Alias is not NULL, it will return a pointer to\r
+  @return                        If Alias is not NULL, it will return a pointer to\r
                                 the NULL-terminated command for that alias.\r
                                 If Alias is NULL, ReturnedData points to a ';'\r
                                 delimited list of alias (e.g.\r
@@ -3801,7 +3801,7 @@ CleanUpShellEnvironment (
 {\r
   EFI_STATUS                        Status;\r
   EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *SimpleEx;\r
-  \r
+\r
   CleanUpShellProtocol (NewShell);\r
 \r
   Status = gBS->CloseEvent(NewShell->ExecutionBreak);\r
@@ -3844,21 +3844,21 @@ NotificationFunction(
   if ( ((KeyData->Key.UnicodeChar == L'c') &&\r
         (KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_LEFT_CONTROL_PRESSED) || KeyData->KeyState.KeyShiftState  == (EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED))) ||\r
       (KeyData->Key.UnicodeChar == 3)\r
-      ){ \r
+      ){\r
     if (ShellInfoObject.NewEfiShellProtocol->ExecutionBreak == NULL) {\r
       return (EFI_UNSUPPORTED);\r
     }\r
     return (gBS->SignalEvent(ShellInfoObject.NewEfiShellProtocol->ExecutionBreak));\r
   } else if  ((KeyData->Key.UnicodeChar == L's') &&\r
               (KeyData->KeyState.KeyShiftState  == (EFI_SHIFT_STATE_VALID|EFI_LEFT_CONTROL_PRESSED) || KeyData->KeyState.KeyShiftState  == (EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED))\r
-              ){ \r
+              ){\r
     ShellInfoObject.HaltOutput = TRUE;\r
   }\r
   return (EFI_SUCCESS);\r
 }\r
 \r
 /**\r
-  Function to start monitoring for CTRL-C using SimpleTextInputEx.  This \r
+  Function to start monitoring for CTRL-C using SimpleTextInputEx.  This\r
   feature's enabled state was not known when the shell initially launched.\r
 \r
   @retval EFI_SUCCESS           The feature is enabled.\r
@@ -3882,8 +3882,8 @@ InernalEfiShellStartMonitor(
     EFI_OPEN_PROTOCOL_GET_PROTOCOL);\r
   if (EFI_ERROR(Status)) {\r
     ShellPrintHiiEx(\r
-      -1, \r
-      -1, \r
+      -1,\r
+      -1,\r
       NULL,\r
       STRING_TOKEN (STR_SHELL_NO_IN_EX),\r
       ShellInfoObject.HiiHandle);\r
@@ -3904,7 +3904,7 @@ InernalEfiShellStartMonitor(
     &KeyData,\r
     NotificationFunction,\r
     &ShellInfoObject.CtrlCNotifyHandle1);\r
-  \r
+\r
   KeyData.KeyState.KeyShiftState  = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED;\r
   if (!EFI_ERROR(Status)) {\r
     Status = SimpleEx->RegisterKeyNotify(\r