summaryrefslogtreecommitdiff
path: root/ShellPkg/Application
diff options
context:
space:
mode:
authorYang Jadis <jadis.yang@intel.com>2015-09-17 01:42:59 +0000
committershenshushi <shenshushi@Edk2>2015-09-17 01:42:59 +0000
commitfb977e33950abd0e1ac50f17c90b05f0593fd4d6 (patch)
treec3c18dd78aaf59b9b065272638a35b088dcb6da4 /ShellPkg/Application
parent580d230d12e16651494ce622bee93591e7fe5491 (diff)
downloadedk2-fb977e33950abd0e1ac50f17c90b05f0593fd4d6.zip
edk2-fb977e33950abd0e1ac50f17c90b05f0593fd4d6.tar.gz
edk2-fb977e33950abd0e1ac50f17c90b05f0593fd4d6.tar.bz2
ShellPkg: Fix Shell fail when execute command in ShellProtocol.Execute().
When execute a command with tailing blank spaces in ShellProtocol.Execute() Shell will fail. This patch move the TrimSpaces operation into ParseCommandLineToArgs function to fix the problem. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yang Jadis <jadis.yang@intel.com> Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18491 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application')
-rw-r--r--ShellPkg/Application/Shell/ShellParametersProtocol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ShellPkg/Application/Shell/ShellParametersProtocol.c b/ShellPkg/Application/Shell/ShellParametersProtocol.c
index bc19df7..b404987 100644
--- a/ShellPkg/Application/Shell/ShellParametersProtocol.c
+++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c
@@ -206,6 +206,7 @@ ParseCommandLineToArgs(
return (EFI_SUCCESS);
}
+ TrimSpaces(&(CHAR16*)CommandLine);
Size = StrSize(CommandLine);
TempParameter = AllocateZeroPool(Size);
if (TempParameter == NULL) {
@@ -359,7 +360,6 @@ CreatePopulateInstallShellParametersProtocol (
//
// Populate Argc and Argv
//
- TrimSpaces (&FullCommandLine);
Status = ParseCommandLineToArgs(FullCommandLine,
&(*NewShellParameters)->Argv,
&(*NewShellParameters)->Argc);