summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellCommandLib
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2016-08-23 10:40:42 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2016-08-25 13:00:45 +0800
commita747bc1eecaff7c34afbc7a4acd81a8330e42d0a (patch)
tree6aebe9c5759b3f32b4f27a5408cf86c6d81c6e15 /ShellPkg/Library/UefiShellCommandLib
parent8e16ac3d74b635c25ad4d6355947a743a11f9eed (diff)
downloadedk2-a747bc1eecaff7c34afbc7a4acd81a8330e42d0a.tar.gz
edk2-a747bc1eecaff7c34afbc7a4acd81a8330e42d0a.tar.bz2
edk2-a747bc1eecaff7c34afbc7a4acd81a8330e42d0a.zip
Revert "ShellPkg: Add Shell[Get|Set]RawCmdLine to ShellCommandLib"
This reverts commit 0fcf8d4df85d861b6e721bd1d8abb449f05e15ed. The above commit causes several regression of "echo" command: 1. Double quotes are not being stripped from the final text. UEFI Shell 2.2 section 3.4.5 chops out the quotes. 2. Output redirection is not working as expected. Text is being redirected, but the ‘> …’ text should not be. 3. Inconsistent special character handling. For example, comments with # seem to be parsed out correctly, but handing of ^ is incorrect. In summary, ‘echo “You are ^#1” > t.txt’ results in the below content in t.txt: “You are ^#1” > t.txt Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellCommandLib')
-rw-r--r--ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
index 7fe908cb57..ac77111ef9 100644
--- a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
+++ b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
@@ -30,7 +30,6 @@ STATIC UINTN mProfileListSize;
STATIC UINTN mFsMaxCount = 0;
STATIC UINTN mBlkMaxCount = 0;
STATIC BUFFER_LIST mFileHandleList;
-STATIC CHAR16 *mRawCmdLine = NULL;
STATIC CONST CHAR8 Hex[] = {
'0',
@@ -1870,50 +1869,6 @@ ShellFileHandleEof(
}
/**
- Function to get the original CmdLine string for current command.
-
- @return A pointer to the buffer of the original command string.
- It's the caller's responsibility to free the buffer.
-**/
-CHAR16*
-EFIAPI
-ShellGetRawCmdLine (
- VOID
- )
-{
- if (mRawCmdLine == NULL) {
- return NULL;
- } else {
- return AllocateCopyPool(StrSize(mRawCmdLine), mRawCmdLine);
- }
-}
-
-/**
- Function to store the raw command string.
-
- The alias and variables have been replaced and spaces are trimmed.
-
- @param[in] CmdLine the command line string to store.
-**/
-VOID
-EFIAPI
-ShellSetRawCmdLine (
- IN CONST CHAR16 *CmdLine
- )
-{
- SHELL_FREE_NON_NULL(mRawCmdLine);
-
- if (CmdLine != NULL) {
- //
- // The spaces in the beginning and end are trimmed.
- //
- ASSERT (*CmdLine != L' ');
- ASSERT (CmdLine[StrLen (CmdLine) - 1] != L' ');
- mRawCmdLine = AllocateCopyPool (StrSize(CmdLine), CmdLine);
- }
-}
-
-/**
Frees any BUFFER_LIST defined type.
@param[in] List The BUFFER_LIST object to free.