summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Application
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-06-27 21:13:38 +0800
committerLiming Gao <liming.gao@intel.com>2018-06-28 11:19:51 +0800
commitba0014b9f8ae1a593f03e744f26008214c2b06a8 (patch)
treed40c0369fe53be8bd4a8c5595b773ec1bf3cf884 /ShellPkg/Application
parent24bfed691d9b581830933623204b56a704d1abd2 (diff)
downloadedk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.tar.gz
edk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.tar.bz2
edk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.zip
ShellPkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'ShellPkg/Application')
-rw-r--r--ShellPkg/Application/Shell/ConsoleLogger.c2
-rw-r--r--ShellPkg/Application/Shell/ConsoleWrappers.c38
-rw-r--r--ShellPkg/Application/Shell/ConsoleWrappers.h10
-rw-r--r--ShellPkg/Application/Shell/FileHandleWrappers.c134
-rw-r--r--ShellPkg/Application/Shell/Shell.c96
-rw-r--r--ShellPkg/Application/Shell/Shell.h8
-rw-r--r--ShellPkg/Application/Shell/ShellEnvVar.c22
-rw-r--r--ShellPkg/Application/Shell/ShellEnvVar.h6
-rw-r--r--ShellPkg/Application/Shell/ShellManParser.c10
-rw-r--r--ShellPkg/Application/Shell/ShellParametersProtocol.c46
-rw-r--r--ShellPkg/Application/Shell/ShellProtocol.c54
-rw-r--r--ShellPkg/Application/Shell/ShellProtocol.h8
-rw-r--r--ShellPkg/Application/ShellCTestApp/README.txt2
-rw-r--r--ShellPkg/Application/ShellCTestApp/ShellCTestApp.inf4
14 files changed, 220 insertions, 220 deletions
diff --git a/ShellPkg/Application/Shell/ConsoleLogger.c b/ShellPkg/Application/Shell/ConsoleLogger.c
index 074e0cf046..07e52f4231 100644
--- a/ShellPkg/Application/Shell/ConsoleLogger.c
+++ b/ShellPkg/Application/Shell/ConsoleLogger.c
@@ -990,7 +990,7 @@ ConsoleLoggerSetMode (
ConsoleInfo->CurrentStartRow = 0;
ConsoleInfo->OurConOut.ClearScreen (&ConsoleInfo->OurConOut);
}
-
+
return Status;
}
diff --git a/ShellPkg/Application/Shell/ConsoleWrappers.c b/ShellPkg/Application/Shell/ConsoleWrappers.c
index e1846ec9cb..a0861e6a1d 100644
--- a/ShellPkg/Application/Shell/ConsoleWrappers.c
+++ b/ShellPkg/Application/Shell/ConsoleWrappers.c
@@ -2,7 +2,7 @@
Function definitions for shell simple text in and out on top of file handles.
(C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -105,7 +105,7 @@ FileBasedSimpleTextInReadKeyStroke(
CharSize = sizeof(CHAR16);
} else {
CharSize = sizeof(CHAR8);
- }
+ }
//
// Decrement the amount of free space by Size or set to zero (for odd length files)
//
@@ -123,7 +123,7 @@ FileBasedSimpleTextInReadKeyStroke(
}
/**
- Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
+ Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
SHELL_FILE_HANDLE to support redirecting input from a file.
@param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.
@@ -162,7 +162,7 @@ CreateSimpleTextInOnFile(
ProtocolToReturn->FileHandle = FileHandleToUse;
ProtocolToReturn->SimpleTextIn.Reset = FileBasedSimpleTextInReset;
ProtocolToReturn->SimpleTextIn.ReadKeyStroke = FileBasedSimpleTextInReadKeyStroke;
-
+
Status = gBS->CreateEvent (
EVT_NOTIFY_WAIT,
TPL_NOTIFY,
@@ -177,9 +177,9 @@ CreateSimpleTextInOnFile(
}
///@todo possibly also install SimpleTextInputEx on the handle at this point.
Status = gBS->InstallProtocolInterface(
- &(ProtocolToReturn->TheHandle),
- &gEfiSimpleTextInProtocolGuid,
- EFI_NATIVE_INTERFACE,
+ &(ProtocolToReturn->TheHandle),
+ &gEfiSimpleTextInProtocolGuid,
+ EFI_NATIVE_INTERFACE,
&(ProtocolToReturn->SimpleTextIn));
if (!EFI_ERROR(Status)) {
*HandleLocation = ProtocolToReturn->TheHandle;
@@ -191,7 +191,7 @@ CreateSimpleTextInOnFile(
}
/**
- Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
+ Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
SHELL_FILE_HANDLE to support redirecting input from a file.
@param[in] SimpleTextIn The pointer to the SimpleTextIn to close.
@@ -213,8 +213,8 @@ CloseSimpleTextInOnFile(
Status = gBS->CloseEvent(((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL *)SimpleTextIn)->SimpleTextIn.WaitForKey);
Status1 = gBS->UninstallProtocolInterface(
- ((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL*)SimpleTextIn)->TheHandle,
- &gEfiSimpleTextInProtocolGuid,
+ ((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL*)SimpleTextIn)->TheHandle,
+ &gEfiSimpleTextInProtocolGuid,
&(((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL*)SimpleTextIn)->SimpleTextIn));
FreePool(SimpleTextIn);
@@ -283,9 +283,9 @@ FileBasedSimpleTextOutQueryMode (
)
{
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *PassThruProtocol;
-
+
PassThruProtocol = ((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *)This)->OriginalSimpleTextOut;
-
+
// Pass the QueryMode call thru to the original SimpleTextOutProtocol
return (PassThruProtocol->QueryMode(
PassThruProtocol,
@@ -421,7 +421,7 @@ FileBasedSimpleTextOutOutputString (
}
/**
- Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
+ Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
SHELL_FILE_HANDLE to support redirecting output from a file.
@param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.
@@ -473,9 +473,9 @@ CreateSimpleTextOutOnFile(
ProtocolToReturn->SimpleTextOut.Mode->CursorVisible = OriginalProtocol->Mode->CursorVisible;
Status = gBS->InstallProtocolInterface(
- &(ProtocolToReturn->TheHandle),
- &gEfiSimpleTextOutProtocolGuid,
- EFI_NATIVE_INTERFACE,
+ &(ProtocolToReturn->TheHandle),
+ &gEfiSimpleTextOutProtocolGuid,
+ EFI_NATIVE_INTERFACE,
&(ProtocolToReturn->SimpleTextOut));
if (!EFI_ERROR(Status)) {
*HandleLocation = ProtocolToReturn->TheHandle;
@@ -488,7 +488,7 @@ CreateSimpleTextOutOnFile(
}
/**
- Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
+ Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
SHELL_FILE_HANDLE to support redirecting output from a file.
@param[in] SimpleTextOut The pointer to the SimpleTextOUT to close.
@@ -505,8 +505,8 @@ CloseSimpleTextOutOnFile(
return (EFI_INVALID_PARAMETER);
}
Status = gBS->UninstallProtocolInterface(
- ((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*)SimpleTextOut)->TheHandle,
- &gEfiSimpleTextOutProtocolGuid,
+ ((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*)SimpleTextOut)->TheHandle,
+ &gEfiSimpleTextOutProtocolGuid,
&(((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*)SimpleTextOut)->SimpleTextOut));
FreePool(SimpleTextOut->Mode);
FreePool(SimpleTextOut);
diff --git a/ShellPkg/Application/Shell/ConsoleWrappers.h b/ShellPkg/Application/Shell/ConsoleWrappers.h
index 35f3a717f5..e1860b4112 100644
--- a/ShellPkg/Application/Shell/ConsoleWrappers.h
+++ b/ShellPkg/Application/Shell/ConsoleWrappers.h
@@ -2,7 +2,7 @@
Function definitions for shell simple text in and out on top of file handles.
(C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -17,7 +17,7 @@
#define _SHELL_CONSOLE_WRAPPERS_HEADER_
/**
- Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
+ Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
SHELL_FILE_HANDLE to support redirecting input from a file.
@param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.
@@ -33,7 +33,7 @@ CreateSimpleTextInOnFile(
);
/**
- Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
+ Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
SHELL_FILE_HANDLE to support redirecting input from a file.
@param[in] SimpleTextIn The pointer to the SimpleTextIn to close.
@@ -46,7 +46,7 @@ CloseSimpleTextInOnFile(
);
/**
- Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
+ Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
SHELL_FILE_HANDLE to support redirecting output from a file.
@param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.
@@ -64,7 +64,7 @@ CreateSimpleTextOutOnFile(
);
/**
- Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
+ Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
SHELL_FILE_HANDLE to support redirecting output from a file.
@param[in] SimpleTextOut The pointer to the SimpleTextOUT to close.
diff --git a/ShellPkg/Application/Shell/FileHandleWrappers.c b/ShellPkg/Application/Shell/FileHandleWrappers.c
index 63aad69fe8..8c62eb5862 100644
--- a/ShellPkg/Application/Shell/FileHandleWrappers.c
+++ b/ShellPkg/Application/Shell/FileHandleWrappers.c
@@ -21,14 +21,14 @@
#define MEM_WRITE_REALLOC_OVERHEAD 1024
/**
- File style interface for console (Open).
-
+ File style interface for console (Open).
+
@param[in] This Ignored.
@param[out] NewHandle Ignored.
@param[in] FileName Ignored.
@param[in] OpenMode Ignored.
@param[in] Attributes Ignored.
-
+
@retval EFI_NOT_FOUND
**/
EFI_STATUS
@@ -46,9 +46,9 @@ FileInterfaceOpenNotFound(
/**
File style interface for console (Close, Delete, & Flush)
-
+
@param[in] This Ignored.
-
+
@retval EFI_SUCCESS
**/
EFI_STATUS
@@ -65,7 +65,7 @@ FileInterfaceNopGeneric(
@param[in] This Ignored.
@param[out] Position Ignored.
-
+
@retval EFI_UNSUPPORTED
**/
EFI_STATUS
@@ -80,10 +80,10 @@ FileInterfaceNopGetPosition(
/**
File style interface for console (SetPosition).
-
+
@param[in] This Ignored.
@param[in] Position Ignored.
-
+
@retval EFI_UNSUPPORTED
**/
EFI_STATUS
@@ -98,12 +98,12 @@ FileInterfaceNopSetPosition(
/**
File style interface for console (GetInfo).
-
+
@param[in] This Ignored.
@param[in] InformationType Ignored.
@param[in, out] BufferSize Ignored.
@param[out] Buffer Ignored.
-
+
@retval EFI_UNSUPPORTED
**/
EFI_STATUS
@@ -120,12 +120,12 @@ FileInterfaceNopGetInfo(
/**
File style interface for console (SetInfo).
-
+
@param[in] This Ignored.
@param[in] InformationType Ignored.
@param[in] BufferSize Ignored.
@param[in] Buffer Ignored.
-
+
@retval EFI_UNSUPPORTED
**/
EFI_STATUS
@@ -144,11 +144,11 @@ FileInterfaceNopSetInfo(
File style interface for StdOut (Write).
Writes data to the screen.
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
@param[in, out] BufferSize Size in bytes of Buffer.
@param[in] Buffer The pointer to the buffer to write.
-
+
@retval EFI_UNSUPPORTED No output console is supported.
@return A return value from gST->ConOut->OutputString.
**/
@@ -171,11 +171,11 @@ FileInterfaceStdOutWrite(
/**
File style interface for StdIn (Write).
-
+
@param[in] This Ignored.
@param[in, out] BufferSize Ignored.
@param[in] Buffer Ignored.
-
+
@retval EFI_UNSUPPORTED
**/
EFI_STATUS
@@ -193,11 +193,11 @@ FileInterfaceStdInWrite(
File style interface for console StdErr (Write).
Writes error to the error output.
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
@param[in, out] BufferSize Size in bytes of Buffer.
@param[in] Buffer The pointer to the buffer to write.
-
+
@return A return value from gST->StdErr->OutputString.
**/
EFI_STATUS
@@ -213,11 +213,11 @@ FileInterfaceStdErrWrite(
/**
File style interface for console StdOut (Read).
-
+
@param[in] This Ignored.
@param[in, out] BufferSize Ignored.
@param[out] Buffer Ignored.
-
+
@retval EFI_UNSUPPORTED
**/
EFI_STATUS
@@ -233,11 +233,11 @@ FileInterfaceStdOutRead(
/**
File style interface for console StdErr (Read).
-
+
@param[in] This Ignored.
@param[in, out] BufferSize Ignored.
@param[out] Buffer Ignored.
-
+
@retval EFI_UNSUPPORTED Always.
**/
EFI_STATUS
@@ -253,11 +253,11 @@ FileInterfaceStdErrRead(
/**
File style interface for NUL file (Read).
-
+
@param[in] This Ignored.
@param[in, out] BufferSize Poiner to 0 upon return.
@param[out] Buffer Ignored.
-
+
@retval EFI_SUCCESS Always.
**/
EFI_STATUS
@@ -274,11 +274,11 @@ FileInterfaceNulRead(
/**
File style interface for NUL file (Write).
-
+
@param[in] This Ignored.
@param[in, out] BufferSize Ignored.
@param[in] Buffer Ignored.
-
+
@retval EFI_SUCCESS
**/
EFI_STATUS
@@ -304,7 +304,7 @@ FileInterfaceNulWrite(
EFI_STATUS
CreateTabCompletionList (
IN CONST CHAR16 *InputString,
- IN CONST UINTN StringLen,
+ IN CONST UINTN StringLen,
IN CONST UINTN BufferSize,
IN OUT EFI_SHELL_FILE_INFO **TabCompletionList,
IN OUT UINTN *TabUpdatePos
@@ -1025,9 +1025,9 @@ typedef struct {
File style interface for Environment Variable (Close).
Frees the memory for this object.
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
-
+
@retval EFI_SUCCESS
**/
EFI_STATUS
@@ -1043,8 +1043,8 @@ FileInterfaceEnvClose(
UINTN TotalSize;
//
- // Most if not all UEFI commands will have an '\r\n' at the end of any output.
- // Since the output was redirected to a variable, it does not make sense to
+ // Most if not all UEFI commands will have an '\r\n' at the end of any output.
+ // Since the output was redirected to a variable, it does not make sense to
// keep this. So, before closing, strip the trailing '\r\n' from the variable
// if it exists.
//
@@ -1063,12 +1063,12 @@ FileInterfaceEnvClose(
NewBuffer = AllocateZeroPool (TotalSize);
if (NewBuffer == NULL) {
return EFI_OUT_OF_RESOURCES;
- }
+ }
Status = SHELL_GET_ENVIRONMENT_VARIABLE(((EFI_FILE_PROTOCOL_ENVIRONMENT*)This)->Name, &NewSize, NewBuffer);
}
-
+
if (!EFI_ERROR(Status) && NewBuffer != NULL) {
-
+
if (TotalSize / sizeof (CHAR16) >= 3) {
if ( (((CHAR16*)NewBuffer)[TotalSize / sizeof (CHAR16) - 2] == CHAR_LINEFEED) &&
(((CHAR16*)NewBuffer)[TotalSize / sizeof (CHAR16) - 3] == CHAR_CARRIAGE_RETURN)
@@ -1112,8 +1112,8 @@ FileInterfaceEnvClose(
}
}
}
- }
-
+ }
+
SHELL_FREE_NON_NULL(NewBuffer);
FreePool((EFI_FILE_PROTOCOL_ENVIRONMENT*)This);
return (Status);
@@ -1121,9 +1121,9 @@ FileInterfaceEnvClose(
/**
File style interface for Environment Variable (Delete).
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
-
+
@retval The return value from FileInterfaceEnvClose().
**/
EFI_STATUS
@@ -1138,11 +1138,11 @@ FileInterfaceEnvDelete(
/**
File style interface for Environment Variable (Read).
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
@param[in, out] BufferSize Size in bytes of Buffer.
@param[out] Buffer The pointer to the buffer to fill.
-
+
@retval EFI_SUCCESS The data was read.
**/
EFI_STATUS
@@ -1162,11 +1162,11 @@ FileInterfaceEnvRead(
/**
File style interface for Volatile Environment Variable (Write).
This function also caches the environment variable into gShellEnvVarList.
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
@param[in, out] BufferSize Size in bytes of Buffer.
@param[in] Buffer The pointer to the buffer to write.
-
+
@retval EFI_SUCCESS The data was successfully write to variable.
@retval SHELL_OUT_OF_RESOURCES A memory allocation failed.
**/
@@ -1239,11 +1239,11 @@ FileInterfaceEnvVolWrite(
/**
File style interface for Non Volatile Environment Variable (Write).
This function also caches the environment variable into gShellEnvVarList.
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
@param[in, out] BufferSize Size in bytes of Buffer.
@param[in] Buffer The pointer to the buffer to write.
-
+
@retval EFI_SUCCESS The data was successfully write to variable.
@retval SHELL_OUT_OF_RESOURCES A memory allocation failed.
**/
@@ -1362,7 +1362,7 @@ CreateFileInterfaceEnv(
EnvFileInterface->Flush = FileInterfaceNopGeneric;
EnvFileInterface->Delete = FileInterfaceEnvDelete;
EnvFileInterface->Read = FileInterfaceEnvRead;
-
+
CopyMem(EnvFileInterface->Name, EnvName, EnvNameSize);
//
@@ -1513,10 +1513,10 @@ typedef struct {
/**
File style interface for Mem (SetPosition).
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
@param[out] Position The position to set.
-
+
@retval EFI_SUCCESS The position was successfully changed.
@retval EFI_INVALID_PARAMETER The Position was invalid.
**/
@@ -1537,12 +1537,12 @@ FileInterfaceMemSetPosition(
/**
File style interface for Mem (GetPosition).
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
@param[out] Position The pointer to the position.
-
+
@retval EFI_SUCCESS The position was retrieved.
-**/
+**/
EFI_STATUS
EFIAPI
FileInterfaceMemGetPosition(
@@ -1604,11 +1604,11 @@ FileInterfaceMemGetInfo(
/**
File style interface for Mem (Write).
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
@param[in, out] BufferSize Size in bytes of Buffer.
@param[in] Buffer The pointer to the buffer to write.
-
+
@retval EFI_OUT_OF_RESOURCES The operation failed due to lack of resources.
@retval EFI_SUCCESS The data was written.
**/
@@ -1659,11 +1659,11 @@ FileInterfaceMemWrite(
/**
File style interface for Mem (Read).
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
@param[in, out] BufferSize Size in bytes of Buffer.
@param[in] Buffer The pointer to the buffer to fill.
-
+
@retval EFI_SUCCESS The data was read.
**/
EFI_STATUS
@@ -1689,11 +1689,11 @@ FileInterfaceMemRead(
File style interface for Mem (Close).
Frees all memory associated with this object.
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
-
+
@retval EFI_SUCCESS The 'file' was closed.
-**/
+**/
EFI_STATUS
EFIAPI
FileInterfaceMemClose(
@@ -1784,7 +1784,7 @@ typedef struct {
@param This Protocol instance pointer.
@param Position Byte position from the start of the file.
-
+
@retval EFI_SUCCESS Data was written.
@retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open.
@@ -1804,7 +1804,7 @@ FileInterfaceFileSetPosition(
@param This Protocol instance pointer.
@param Position Byte position from the start of the file.
-
+
@retval EFI_SUCCESS Data was written.
@retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open..
@@ -1999,7 +1999,7 @@ FileInterfaceFileOpen (
Close and delete the file handle.
@param This Protocol instance pointer.
-
+
@retval EFI_SUCCESS The device was opened.
@retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted.
@@ -2018,9 +2018,9 @@ FileInterfaceFileDelete(
/**
File style interface for File (Close).
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
-
+
@retval EFI_SUCCESS The file was closed.
**/
EFI_STATUS
@@ -2038,13 +2038,13 @@ FileInterfaceFileClose(
/**
File style interface for File (Write).
- If the file was opened with ASCII mode the data will be processed through
+ If the file was opened with ASCII mode the data will be processed through
AsciiSPrint before writing.
-
+
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
@param[in, out] BufferSize Size in bytes of Buffer.
@param[in] Buffer The pointer to the buffer to write.
-
+
@retval EFI_SUCCESS The data was written.
**/
EFI_STATUS
@@ -2081,10 +2081,10 @@ FileInterfaceFileWrite(
This will create a new EFI_FILE_PROTOCOL identical to the Templace
except that the new one has Unicode and Ascii knowledge.
-
+
@param[in] Template A pointer to the EFI_FILE_PROTOCOL object.
@param[in] Unicode TRUE for UCS-2, FALSE for ASCII.
-
+
@return a new EFI_FILE_PROTOCOL object to be used instead of the template.
**/
EFI_FILE_PROTOCOL*
diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c
index 577e17311b..47ae3c373c 100644
--- a/ShellPkg/Application/Shell/Shell.c
+++ b/ShellPkg/Application/Shell/Shell.c
@@ -1,7 +1,7 @@
/** @file
This is THE shell (application)
- Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2013-2014 Hewlett-Packard Development Company, L.P.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -104,7 +104,7 @@ TrimSpaces(
}
/**
- Parse for the next instance of one string within another string. Can optionally make sure that
+ Parse for the next instance of one string within another string. Can optionally make sure that
the string was not escaped (^ character) per the shell specification.
@param[in] SourceString The string to search within
@@ -160,13 +160,13 @@ IsValidEnvironmentVariableName(
)
{
CONST CHAR16 *Walker;
-
+
Walker = NULL;
ASSERT (BeginPercent != NULL);
ASSERT (EndPercent != NULL);
ASSERT (BeginPercent < EndPercent);
-
+
if ((BeginPercent + 1) == EndPercent) {
return FALSE;
}
@@ -212,9 +212,9 @@ ContainsSplit(
SecondQuote = NULL;
TempSpot = FindFirstCharacter(CmdLine, L"|", L'^');
- if (FirstQuote == NULL ||
- TempSpot == NULL ||
- TempSpot == CHAR_NULL ||
+ if (FirstQuote == NULL ||
+ TempSpot == NULL ||
+ TempSpot == CHAR_NULL ||
FirstQuote > TempSpot
) {
return (BOOLEAN) ((TempSpot != NULL) && (*TempSpot != CHAR_NULL));
@@ -223,7 +223,7 @@ ContainsSplit(
while ((TempSpot != NULL) && (*TempSpot != CHAR_NULL)) {
if (FirstQuote == NULL || FirstQuote > TempSpot) {
break;
- }
+ }
SecondQuote = FindNextInstance (FirstQuote + 1, L"\"", TRUE);
if (SecondQuote == NULL) {
break;
@@ -235,14 +235,14 @@ ContainsSplit(
FirstQuote = FindNextInstance (SecondQuote + 1, L"\"", TRUE);
TempSpot = FindFirstCharacter(TempSpot + 1, L"|", L'^');
continue;
- }
+ }
}
-
+
return (BOOLEAN) ((TempSpot != NULL) && (*TempSpot != CHAR_NULL));
}
/**
- Function to start monitoring for CTRL-S using SimpleTextInputEx. This
+ Function to start monitoring for CTRL-S using SimpleTextInputEx. This
feature's enabled state was not known when the shell initially launched.
@retval EFI_SUCCESS The feature is enabled.
@@ -266,8 +266,8 @@ InternalEfiShellStartCtrlSMonitor(
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
if (EFI_ERROR(Status)) {
ShellPrintHiiEx(
- -1,
- -1,
+ -1,
+ -1,
NULL,
STRING_TOKEN (STR_SHELL_NO_IN_EX),
ShellInfoObject.HiiHandle);
@@ -284,7 +284,7 @@ InternalEfiShellStartCtrlSMonitor(
&KeyData,
NotificationFunction,
&ShellInfoObject.CtrlSNotifyHandle1);
-
+
KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED;
if (!EFI_ERROR(Status)) {
Status = SimpleEx->RegisterKeyNotify(
@@ -302,7 +302,7 @@ InternalEfiShellStartCtrlSMonitor(
&KeyData,
NotificationFunction,
&ShellInfoObject.CtrlSNotifyHandle3);
- }
+ }
KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED;
if (!EFI_ERROR(Status)) {
Status = SimpleEx->RegisterKeyNotify(
@@ -1129,7 +1129,7 @@ ProcessCommandLine(
/**
Function try to find location of the Startup.nsh file.
-
+
The buffer is callee allocated and should be freed by the caller.
@param ImageDevicePath The path to the image for shell. first place to look for the startup script
@@ -1156,7 +1156,7 @@ LocateStartupScript (
// Try to find 'Startup.nsh' in the directory where the shell itself was launched.
//
MapName = ShellInfoObject.NewEfiShellProtocol->GetMapFromDevicePath (&ImageDevicePath);
- if (MapName != NULL) {
+ if (MapName != NULL) {
StartupScriptPath = StrnCatGrow (&StartupScriptPath, &Size, MapName, 0);
if (StartupScriptPath == NULL) {
//
@@ -1387,7 +1387,7 @@ AddBufferToFreeList (
/**
- Create a new buffer list and stores the old one to OldBufferList
+ Create a new buffer list and stores the old one to OldBufferList
@param OldBufferList The temporary list head used to store the nodes in BufferToFreeList.
**/
@@ -1432,7 +1432,7 @@ AddLineToCommandHistory(
Count = 0;
MaxHistoryCmdCount = PcdGet16(PcdShellMaxHistoryCommandCount);
-
+
if (MaxHistoryCmdCount == 0) {
return ;
}
@@ -1546,7 +1546,7 @@ StripUnreplacedEnvironmentVariables(
}
continue;
}
-
+
if (FirstQuote == NULL || SecondPercent < FirstQuote) {
if (IsValidEnvironmentVariableName(FirstPercent, SecondPercent)) {
//
@@ -1662,16 +1662,16 @@ ShellConvertVariables (
; MasterEnvList != NULL && *MasterEnvList != CHAR_NULL
; MasterEnvList += StrLen(MasterEnvList) + 1
){
- StrCpyS( ItemTemp,
- ((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
+ StrCpyS( ItemTemp,
+ ((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
L"%"
);
- StrCatS( ItemTemp,
- ((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
+ StrCatS( ItemTemp,
+ ((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
MasterEnvList
);
- StrCatS( ItemTemp,
- ((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
+ StrCatS( ItemTemp,
+ ((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
L"%"
);
ShellCopySearchAndReplace(NewCommandLine1, NewCommandLine2, NewSize, ItemTemp, EfiShellGetEnv(MasterEnvList), TRUE, FALSE);
@@ -1697,7 +1697,7 @@ ShellConvertVariables (
//
ShellCopySearchAndReplace(NewCommandLine1, NewCommandLine2, NewSize, L"^%", L"%", TRUE, FALSE);
StrCpyS(NewCommandLine1, NewSize/sizeof(CHAR16), NewCommandLine2);
-
+
FreePool(NewCommandLine2);
FreePool(ItemTemp);
@@ -1823,7 +1823,7 @@ RunSplitCommand(
}
/**
- Take the original command line, substitute any variables, free
+ Take the original command line, substitute any variables, free
the original string, return the modified copy.
@param[in] CmdLine pointer to the command line to update.
@@ -1847,7 +1847,7 @@ ShellSubstituteVariables(
}
/**
- Take the original command line, substitute any alias in the first group of space delimited characters, free
+ Take the original command line, substitute any alias in the first group of space delimited characters, free
the original string, return the modified copy.
@param[in] CmdLine pointer to the command line to update.
@@ -1906,7 +1906,7 @@ ShellSubstituteAliases(
SHELL_FREE_NON_NULL(*CmdLine);
SHELL_FREE_NON_NULL(CommandName);
-
+
//
// re-assign the passed in double pointer to point to our newly allocated buffer
//
@@ -1919,7 +1919,7 @@ ShellSubstituteAliases(
Takes the Argv[0] part of the command line and determine the meaning of it.
@param[in] CmdName pointer to the command line to update.
-
+
@retval Internal_Command The name is an internal command.
@retval File_Sys_Change the name is a file system change.
@retval Script_File_Name the name is a NSH script file.
@@ -1947,7 +1947,7 @@ GetOperationType(
// Test for file system change request. anything ending with first : and cant have spaces.
//
if (CmdName[(StrLen(CmdName)-1)] == L':') {
- if ( StrStr(CmdName, L" ") != NULL
+ if ( StrStr(CmdName, L" ") != NULL
|| StrLen(StrStr(CmdName, L":")) > 1
) {
return (Unknown_Invalid);
@@ -1977,7 +1977,7 @@ GetOperationType(
SHELL_FREE_NON_NULL(FileWithPath);
return (Efi_Application);
}
-
+
SHELL_FREE_NON_NULL(FileWithPath);
//
// No clue what this is... return invalid flag...
@@ -1994,7 +1994,7 @@ GetOperationType(
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
@retval EFI_NOT_FOUND The operation type is unknown or invalid.
**/
-EFI_STATUS
+EFI_STATUS
IsValidSplit(
IN CONST CHAR16 *CmdLine
)
@@ -2079,13 +2079,13 @@ VerifySplit(
// recurse to verify the next item
//
TempSpot = FindFirstCharacter(CmdLine, L"|", L'^') + 1;
- if (*TempSpot == L'a' &&
+ if (*TempSpot == L'a' &&
(*(TempSpot + 1) == L' ' || *(TempSpot + 1) == CHAR_NULL)
) {
// If it's an ASCII pipe '|a'
TempSpot += 1;
}
-
+
return (VerifySplit(TempSpot));
}
@@ -2149,7 +2149,7 @@ ChangeMappedDrive(
// make sure we are the right operation
//
ASSERT(CmdLine[(StrLen(CmdLine)-1)] == L':' && StrStr(CmdLine, L" ") == NULL);
-
+
//
// Call the protocol API to do the work
//
@@ -2294,7 +2294,7 @@ ProcessCommandLineToFinal(
Run an internal shell command.
This API will update the shell's environment since these commands are libraries.
-
+
@param[in] CmdLine the command line to run.
@param[in] FirstParameter the first parameter on the command line
@param[in] ParamProtocol the shell parameters protocol pointer
@@ -2317,7 +2317,7 @@ RunInternalCommand(
SHELL_STATUS CommandReturnedStatus;
BOOLEAN LastError;
CHAR16 *Walker;
- CHAR16 *NewCmdLine;
+ CHAR16 *NewCmdLine;
NewCmdLine = AllocateCopyPool (StrSize (CmdLine), CmdLine);
if (NewCmdLine == NULL) {
@@ -2597,7 +2597,7 @@ SetupAndRunCommandOrFile(
/**
Function will process and run a command line.
- This will determine if the command line represents an internal shell
+ This will determine if the command line represents an internal shell
command or dispatch an external application.
@param[in] CmdLine The command line to parse.
@@ -2673,7 +2673,7 @@ RunShellCommand(
Status = ProcessNewSplitCommandLine(CleanOriginal);
SHELL_FREE_NON_NULL(CleanOriginal);
return (Status);
- }
+ }
//
// We need the first parameter information so we can determine the operation type
@@ -2734,7 +2734,7 @@ RunShellCommand(
/**
Function will process and run a command line.
- This will determine if the command line represents an internal shell
+ This will determine if the command line represents an internal shell
command or dispatch an external application.
@param[in] CmdLine The command line to parse.
@@ -2907,8 +2907,8 @@ RunScriptFileHandle (
; // conditional increment in the body of the loop
){
ASSERT(CommandLine2 != NULL);
- StrnCpyS( CommandLine2,
- PrintBuffSize/sizeof(CHAR16),
+ StrnCpyS( CommandLine2,
+ PrintBuffSize/sizeof(CHAR16),
NewScriptFile->CurrentCommand->Cl,
PrintBuffSize/sizeof(CHAR16) - 1
);
@@ -2934,8 +2934,8 @@ RunScriptFileHandle (
//
// Due to variability in starting the find and replace action we need to have both buffers the same.
//
- StrnCpyS( CommandLine,
- PrintBuffSize/sizeof(CHAR16),
+ StrnCpyS( CommandLine,
+ PrintBuffSize/sizeof(CHAR16),
CommandLine2,
PrintBuffSize/sizeof(CHAR16) - 1
);
@@ -2990,8 +2990,8 @@ RunScriptFileHandle (
Status = ShellCopySearchAndReplace(CommandLine, CommandLine2, PrintBuffSize, L"%8", L"\"\"", FALSE, FALSE);
Status = ShellCopySearchAndReplace(CommandLine2, CommandLine, PrintBuffSize, L"%9", L"\"\"", FALSE, FALSE);
- StrnCpyS( CommandLine2,
- PrintBuffSize/sizeof(CHAR16),
+ StrnCpyS( CommandLine2,
+ PrintBuffSize/sizeof(CHAR16),
CommandLine,
PrintBuffSize/sizeof(CHAR16) - 1
);
diff --git a/ShellPkg/Application/Shell/Shell.h b/ShellPkg/Application/Shell/Shell.h
index ff08494468..69b19c6a2d 100644
--- a/ShellPkg/Application/Shell/Shell.h
+++ b/ShellPkg/Application/Shell/Shell.h
@@ -2,7 +2,7 @@
function definitions for internal to shell functions.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -294,7 +294,7 @@ RunCommand(
/**
Function will process and run a command line.
- This will determine if the command line represents an internal shell
+ This will determine if the command line represents an internal shell
command or dispatch an external application.
@param[in] CmdLine The command line to parse.
@@ -383,8 +383,8 @@ TrimSpaces(
);
/**
-
- Create a new buffer list and stores the old one to OldBufferList
+
+ Create a new buffer list and stores the old one to OldBufferList
@param OldBufferList The temporary list head used to store the nodes in BufferToFreeList.
**/
diff --git a/ShellPkg/Application/Shell/ShellEnvVar.c b/ShellPkg/Application/Shell/ShellEnvVar.c
index 4c49c1ca98..6632764542 100644
--- a/ShellPkg/Application/Shell/ShellEnvVar.c
+++ b/ShellPkg/Application/Shell/ShellEnvVar.c
@@ -1,7 +1,7 @@
/** @file
function declarations for shell environment functions.
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -143,9 +143,9 @@ GetEnvironmentVariableList(
if (ListHead == NULL) {
return (EFI_INVALID_PARAMETER);
}
-
+
Status = EFI_SUCCESS;
-
+
ValBufferSize = INIT_DATA_BUFFER_SIZE;
NameBufferSize = INIT_NAME_BUFFER_SIZE;
VariableName = AllocateZeroPool(NameBufferSize);
@@ -171,7 +171,7 @@ GetEnvironmentVariableList(
NameSize = NameBufferSize;
Status = gRT->GetNextVariableName(&NameSize, VariableName, &Guid);
}
-
+
if (!EFI_ERROR(Status) && CompareGuid(&Guid, &gShellVariableGuid)){
VarList = AllocateZeroPool(sizeof(ENV_VAR_LIST));
if (VarList == NULL) {
@@ -200,7 +200,7 @@ GetEnvironmentVariableList(
Status = EFI_OUT_OF_RESOURCES;
break;
}
-
+
ValSize = ValBufferSize;
Status = SHELL_GET_ENVIRONMENT_VARIABLE_AND_ATTRIBUTES(VariableName, &VarList->Atts, &ValSize, VarList->Val);
}
@@ -348,8 +348,8 @@ SetEnvironmentVariables(
//
// Copy the string into the Key, leaving the last character allocated as NULL to terminate
//
- StrnCpyS( Node->Key,
- StrStr(CurrentString, L"=") - CurrentString + 1,
+ StrnCpyS( Node->Key,
+ StrStr(CurrentString, L"=") - CurrentString + 1,
CurrentString,
StrStr(CurrentString, L"=") - CurrentString
);
@@ -413,7 +413,7 @@ ShellFindEnvVarInList (
)
{
ENV_VAR_LIST *Node;
-
+
if (Key == NULL || Value == NULL || ValueSize == NULL) {
return SHELL_INVALID_PARAMETER;
}
@@ -459,7 +459,7 @@ ShellAddEnvVarToList (
ENV_VAR_LIST *Node;
CHAR16 *LocalKey;
CHAR16 *LocalValue;
-
+
if (Key == NULL || Value == NULL || ValueSize == 0) {
return EFI_INVALID_PARAMETER;
}
@@ -511,7 +511,7 @@ ShellAddEnvVarToList (
Remove a specified environment variable in gShellEnvVarList.
@param Key The name of the environment variable.
-
+
@retval EFI_SUCCESS The command executed successfully.
@retval EFI_NOT_FOUND The environment variable is not found in
gShellEnvVarList.
@@ -546,7 +546,7 @@ ShellRemvoeEnvVarFromList (
/**
Initialize the gShellEnvVarList and cache all Shell-Guid-based environment
variables.
-
+
**/
EFI_STATUS
ShellInitEnvVarList (
diff --git a/ShellPkg/Application/Shell/ShellEnvVar.h b/ShellPkg/Application/Shell/ShellEnvVar.h
index b9efed042b..0684516a5c 100644
--- a/ShellPkg/Application/Shell/ShellEnvVar.h
+++ b/ShellPkg/Application/Shell/ShellEnvVar.h
@@ -6,7 +6,7 @@
//#include <Library/UefiRuntimeServicesTableLib.h>
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -266,9 +266,9 @@ ShellRemvoeEnvVarFromList (
);
/**
- Initialize the gShellEnvVarList and cache all Shell-Guid-based environment
+ Initialize the gShellEnvVarList and cache all Shell-Guid-based environment
variables.
-
+
**/
EFI_STATUS
ShellInitEnvVarList (
diff --git a/ShellPkg/Application/Shell/ShellManParser.c b/ShellPkg/Application/Shell/ShellManParser.c
index 975f3c22da..b180c6c8f7 100644
--- a/ShellPkg/Application/Shell/ShellManParser.c
+++ b/ShellPkg/Application/Shell/ShellManParser.c
@@ -146,14 +146,14 @@ GetManFileName(
} else {
Buffer = AllocateZeroPool(StrSize(ManFileName) + 4*sizeof(CHAR16));
if (Buffer != NULL) {
- StrnCpyS( Buffer,
- (StrSize(ManFileName) + 4*sizeof(CHAR16))/sizeof(CHAR16),
- ManFileName,
+ StrnCpyS( Buffer,
+ (StrSize(ManFileName) + 4*sizeof(CHAR16))/sizeof(CHAR16),
+ ManFileName,
StrLen(ManFileName)
);
- StrnCatS( Buffer,
+ StrnCatS( Buffer,
(StrSize(ManFileName) + 4*sizeof(CHAR16))/sizeof(CHAR16),
- L".man",
+ L".man",
4
);
}
diff --git a/ShellPkg/Application/Shell/ShellParametersProtocol.c b/ShellPkg/Application/Shell/ShellParametersProtocol.c
index 8d76fb4be7..90889a3725 100644
--- a/ShellPkg/Application/Shell/ShellParametersProtocol.c
+++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c
@@ -5,7 +5,7 @@
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
Copyright (C) 2014, Red Hat, Inc.
(C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -147,8 +147,8 @@ DEBUG_CODE_END();
// Remove any non-escaped quotes in the string
// Remove any remaining escape characters in the string
//
- for (NextDelim = FindFirstCharacter(*TempParameter, L"\"^", CHAR_NULL)
- ; *NextDelim != CHAR_NULL
+ for (NextDelim = FindFirstCharacter(*TempParameter, L"\"^", CHAR_NULL)
+ ; *NextDelim != CHAR_NULL
; NextDelim = FindFirstCharacter(NextDelim, L"\"^", CHAR_NULL)
) {
if (*NextDelim == L'^') {
@@ -165,9 +165,9 @@ DEBUG_CODE_END();
//
if (StripQuotation) {
CopyMem ((CHAR16*)NextDelim, NextDelim + 1, StrSize (NextDelim + 1));
- } else{
+ } else{
NextDelim++;
- }
+ }
}
}
@@ -181,7 +181,7 @@ DEBUG_CODE_END();
parameters for inclusion in EFI_SHELL_PARAMETERS_PROTOCOL. this supports space
delimited and quote surrounded parameter definition.
- All special character processing (alias, environment variable, redirection,
+ All special character processing (alias, environment variable, redirection,
etc... must be complete before calling this API.
@param[in] CommandLine String of command line to parse
@@ -269,7 +269,7 @@ ParseCommandLineToArgs(
}
ASSERT(Count >= (*Argc));
Status = EFI_SUCCESS;
-
+
Done:
SHELL_FREE_NON_NULL(TempParameter);
SHELL_FREE_NON_NULL(NewCommandLine);
@@ -503,7 +503,7 @@ IsUnicodeFile(
}
gEfiShellProtocol->SetFilePosition(Handle, OriginalFilePosition);
gEfiShellProtocol->CloseFile(Handle);
- return (Status);
+ return (Status);
}
/**
@@ -580,7 +580,7 @@ FixFileName (
Copy = FileName+1;
if ((TempLocation = StrStr(Copy , L"\"")) != NULL) {
TempLocation[0] = CHAR_NULL;
- }
+ }
} else {
Copy = FileName;
while(Copy[0] == L' ') {
@@ -588,7 +588,7 @@ FixFileName (
}
if ((TempLocation = StrStr(Copy , L" ")) != NULL) {
TempLocation[0] = CHAR_NULL;
- }
+ }
}
if (Copy[0] == CHAR_NULL) {
@@ -620,7 +620,7 @@ FixVarName (
Copy = FileName+1;
if ((TempLocation = StrStr(Copy , L"%")) != NULL) {
TempLocation[0] = CHAR_NULL;
- }
+ }
}
return (FixFileName(Copy));
@@ -629,9 +629,9 @@ FixVarName (
/**
Remove the unicode file tag from the begining of the file buffer since that will not be
used by StdIn.
-
+
@param[in] Handle Pointer to the handle of the file to be processed.
-
+
@retval EFI_SUCCESS The unicode file tag has been moved successfully.
**/
EFI_STATUS
@@ -837,7 +837,7 @@ UpdateStdInStdOutStdErr(
if (StrStr(CommandLineWalker, L" 1>> ") != NULL) {
Status = EFI_NOT_FOUND;
}
- }
+ }
if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" >> ")) != NULL) {
FirstLocation = MIN(CommandLineWalker, FirstLocation);
SetMem16(CommandLineWalker, 8, L' ');
@@ -864,7 +864,7 @@ UpdateStdInStdOutStdErr(
if (StrStr(CommandLineWalker, L" >>a ") != NULL) {
Status = EFI_NOT_FOUND;
}
- }
+ }
if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" 1>a ")) != NULL) {
FirstLocation = MIN(CommandLineWalker, FirstLocation);
SetMem16(CommandLineWalker, 10, L' ');
@@ -878,7 +878,7 @@ UpdateStdInStdOutStdErr(
if (StrStr(CommandLineWalker, L" 1>a ") != NULL) {
Status = EFI_NOT_FOUND;
}
- }
+ }
if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" >a ")) != NULL) {
FirstLocation = MIN(CommandLineWalker, FirstLocation);
SetMem16(CommandLineWalker, 8, L' ');
@@ -1107,7 +1107,7 @@ UpdateStdInStdOutStdErr(
//
// Cant redirect during a reconnect operation.
//
- ||(StrStr(NewCommandLine, L"connect -r") != NULL
+ ||(StrStr(NewCommandLine, L"connect -r") != NULL
&& (StdOutVarName != NULL || StdOutFileName != NULL || StdErrFileName != NULL || StdErrVarName != NULL))
//
// Check that filetypes (Unicode/Ascii) do not change during an append
@@ -1307,7 +1307,7 @@ RestoreStdInStdOutStdErr (
{
SPLIT_LIST *Split;
- if (ShellParameters == NULL
+ if (ShellParameters == NULL
||OldStdIn == NULL
||OldStdOut == NULL
||OldStdErr == NULL
@@ -1382,7 +1382,7 @@ UpdateArgcArgv(
)
{
BOOLEAN StripParamQuotation;
-
+
ASSERT(ShellParameters != NULL);
StripParamQuotation = TRUE;
@@ -1396,10 +1396,10 @@ UpdateArgcArgv(
if (Type == Script_File_Name) {
StripParamQuotation = FALSE;
}
-
- return ParseCommandLineToArgs( NewCommandLine,
- StripParamQuotation,
- &(ShellParameters->Argv),
+
+ return ParseCommandLineToArgs( NewCommandLine,
+ StripParamQuotation,
+ &(ShellParameters->Argv),
&(ShellParameters->Argc)
);
}
diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c
index d8b1e065e0..f2ca2029e3 100644
--- a/ShellPkg/Application/Shell/ShellProtocol.c
+++ b/ShellPkg/Application/Shell/ShellProtocol.c
@@ -4,7 +4,7 @@
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
- Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1422,7 +1422,7 @@ EfiShellEnablePageBreak (
variables with the format 'x=y', where x is the
environment variable name and y is the value. If this
is NULL, then the current shell environment is used.
-
+
@param[out] StartImageStatus Returned status from gBS->StartImage.
@retval EFI_SUCCESS The command executed successfully. The status code
@@ -1460,7 +1460,7 @@ InternalShellExecuteDevicePath(
ZeroMem(&ShellParamsProtocol, sizeof(EFI_SHELL_PARAMETERS_PROTOCOL));
NewHandle = NULL;
-
+
NewCmdLine = AllocateCopyPool (StrSize (CommandLine), CommandLine);
if (NewCmdLine == NULL) {
return EFI_OUT_OF_RESOURCES;
@@ -1505,8 +1505,8 @@ InternalShellExecuteDevicePath(
//
if (LoadedImage->ImageCodeType != EfiLoaderCode){
ShellPrintHiiEx(
- -1,
- -1,
+ -1,
+ -1,
NULL,
STRING_TOKEN (STR_SHELL_IMAGE_NOT_APP),
ShellInfoObject.HiiHandle
@@ -1630,7 +1630,7 @@ FreeAlloc:
variables with the format 'x=y', where x is the
environment variable name and y is the value. If this
is NULL, then the current shell environment is used.
-
+
@param[out] StartImageStatus Returned status from the command line.
@retval EFI_SUCCESS The command executed successfully. The status code
@@ -2210,7 +2210,7 @@ EfiShellGetGuidFromName(
if (Guid == NULL || GuidName == NULL) {
return (EFI_INVALID_PARAMETER);
}
-
+
Status = GetGuidFromStringName(GuidName, NULL, &NewGuid);
if (!EFI_ERROR(Status)) {
@@ -2762,8 +2762,8 @@ EfiShellGetEnvEx(
; Node = (ENV_VAR_LIST*)GetNextNode(&gShellEnvVarList.Link, &Node->Link)
){
ASSERT(Node->Key != NULL);
- StrCpyS( CurrentWriteLocation,
- (Size)/sizeof(CHAR16) - (CurrentWriteLocation - ((CHAR16*)Buffer)),
+ StrCpyS( CurrentWriteLocation,
+ (Size)/sizeof(CHAR16) - (CurrentWriteLocation - ((CHAR16*)Buffer)),
Node->Key
);
CurrentWriteLocation += StrLen(CurrentWriteLocation) + 1;
@@ -3233,9 +3233,9 @@ EfiShellGetHelpText(
return EFI_OUT_OF_RESOURCES;
}
- StrnCpyS( FixCommand,
- (StrSize(Command) - 4 * sizeof (CHAR16))/sizeof(CHAR16),
- Command,
+ StrnCpyS( FixCommand,
+ (StrSize(Command) - 4 * sizeof (CHAR16))/sizeof(CHAR16),
+ Command,
StrLen(Command)-4
);
Status = ProcessManFile(FixCommand, FixCommand, Sections, NULL, HelpText);
@@ -3295,7 +3295,7 @@ InternalEfiShellGetListAlias(
VOID
)
{
-
+
EFI_STATUS Status;
EFI_GUID Guid;
CHAR16 *VariableName;
@@ -3330,17 +3330,17 @@ InternalEfiShellGetListAlias(
RetVal = NULL;
break;
}
-
+
NameSize = NameBufferSize;
Status = gRT->GetNextVariableName(&NameSize, VariableName, &Guid);
}
-
+
if (EFI_ERROR (Status)) {
SHELL_FREE_NON_NULL(RetVal);
RetVal = NULL;
break;
}
-
+
if (CompareGuid(&Guid, &gShellAliasGuid)){
ASSERT((RetVal == NULL && RetSize == 0) || (RetVal != NULL));
RetVal = StrnCatGrow(&RetVal, &RetSize, VariableName, 0);
@@ -3355,10 +3355,10 @@ InternalEfiShellGetListAlias(
/**
Convert a null-terminated unicode string, in-place, to all lowercase.
Then return it.
-
+
@param Str The null-terminated string to be converted to all lowercase.
-
- @return The null-terminated string converted into all lowercase.
+
+ @return The null-terminated string converted into all lowercase.
**/
CHAR16 *
ToLower (
@@ -3385,7 +3385,7 @@ ToLower (
@param[out] Volatile upon return of a single command if TRUE indicates
this is stored in a volatile fashion. FALSE otherwise.
- @return If Alias is not NULL, it will return a pointer to
+ @return If Alias is not NULL, it will return a pointer to
the NULL-terminated command for that alias.
If Alias is NULL, ReturnedData points to a ';'
delimited list of alias (e.g.
@@ -3801,7 +3801,7 @@ CleanUpShellEnvironment (
{
EFI_STATUS Status;
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *SimpleEx;
-
+
CleanUpShellProtocol (NewShell);
Status = gBS->CloseEvent(NewShell->ExecutionBreak);
@@ -3844,21 +3844,21 @@ NotificationFunction(
if ( ((KeyData->Key.UnicodeChar == L'c') &&
(KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_LEFT_CONTROL_PRESSED) || KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED))) ||
(KeyData->Key.UnicodeChar == 3)
- ){
+ ){
if (ShellInfoObject.NewEfiShellProtocol->ExecutionBreak == NULL) {
return (EFI_UNSUPPORTED);
}
return (gBS->SignalEvent(ShellInfoObject.NewEfiShellProtocol->ExecutionBreak));
} else if ((KeyData->Key.UnicodeChar == L's') &&
(KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_LEFT_CONTROL_PRESSED) || KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED))
- ){
+ ){
ShellInfoObject.HaltOutput = TRUE;
}
return (EFI_SUCCESS);
}
/**
- Function to start monitoring for CTRL-C using SimpleTextInputEx. This
+ Function to start monitoring for CTRL-C using SimpleTextInputEx. This
feature's enabled state was not known when the shell initially launched.
@retval EFI_SUCCESS The feature is enabled.
@@ -3882,8 +3882,8 @@ InernalEfiShellStartMonitor(
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
if (EFI_ERROR(Status)) {
ShellPrintHiiEx(
- -1,
- -1,
+ -1,
+ -1,
NULL,
STRING_TOKEN (STR_SHELL_NO_IN_EX),
ShellInfoObject.HiiHandle);
@@ -3904,7 +3904,7 @@ InernalEfiShellStartMonitor(
&KeyData,
NotificationFunction,
&ShellInfoObject.CtrlCNotifyHandle1);
-
+
KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED;
if (!EFI_ERROR(Status)) {
Status = SimpleEx->RegisterKeyNotify(
diff --git a/ShellPkg/Application/Shell/ShellProtocol.h b/ShellPkg/Application/Shell/ShellProtocol.h
index 755a402c98..2cb7b0337c 100644
--- a/ShellPkg/Application/Shell/ShellProtocol.h
+++ b/ShellPkg/Application/Shell/ShellProtocol.h
@@ -3,7 +3,7 @@
manipulation, and initialization of EFI_SHELL_PROTOCOL.
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -36,7 +36,7 @@ typedef struct {
This must be removed via calling CleanUpShellProtocol().
- @param[in, out] NewShell The pointer to the pointer to the structure
+ @param[in, out] NewShell The pointer to the pointer to the structure
to install.
@retval EFI_SUCCESS The operation was successful.
@@ -819,7 +819,7 @@ EfiShellIsRootShell(
aliases will be returned in ReturnedData.
@param[out] Volatile upon return of a single command if TRUE indicates
this is stored in a volatile fashion. FALSE otherwise.
- @return If Alias is not NULL, it will return a pointer to
+ @return If Alias is not NULL, it will return a pointer to
the NULL-terminated command for that alias.
If Alias is NULL, ReturnedData points to a ';'
delimited list of alias (e.g.
@@ -917,7 +917,7 @@ InternalEfiShellSetEnv(
);
/**
- Function to start monitoring for CTRL-C using SimpleTextInputEx. This
+ Function to start monitoring for CTRL-C using SimpleTextInputEx. This
feature's enabled state was not known when the shell initially launched.
@retval EFI_SUCCESS The feature is enabled.
diff --git a/ShellPkg/Application/ShellCTestApp/README.txt b/ShellPkg/Application/ShellCTestApp/README.txt
index 7814bb8386..02594e0d12 100644
--- a/ShellPkg/Application/ShellCTestApp/README.txt
+++ b/ShellPkg/Application/ShellCTestApp/README.txt
@@ -2,4 +2,4 @@ TestArgv.nsh is a very simple shell script to test how the interpreter parses
the parameters. It uses ShellCTestApp.efi to dump the parameters passed from the
intepreter.
-TestArgv.log is the desired output created using "TestArgv.nsh > TestArgv.log". \ No newline at end of file
+TestArgv.log is the desired output created using "TestArgv.nsh > TestArgv.log".
diff --git a/ShellPkg/Application/ShellCTestApp/ShellCTestApp.inf b/ShellPkg/Application/ShellCTestApp/ShellCTestApp.inf
index 4839b9fd97..3f266bd9a0 100644
--- a/ShellPkg/Application/ShellCTestApp/ShellCTestApp.inf
+++ b/ShellPkg/Application/ShellCTestApp/ShellCTestApp.inf
@@ -1,7 +1,7 @@
## @file
# This is the shell application
#
-# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -36,4 +36,4 @@
[LibraryClasses]
ShellCEntryLib
- UefiLib \ No newline at end of file
+ UefiLib