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
This commit is contained in:
Yang Jadis 2015-09-17 01:42:59 +00:00 committed by shenshushi
parent 580d230d12
commit fb977e3395
1 changed files with 1 additions and 1 deletions

View File

@ -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);