mirror of https://github.com/acidanthera/audk.git
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:
parent
580d230d12
commit
fb977e3395
ShellPkg/Application/Shell
|
@ -206,6 +206,7 @@ ParseCommandLineToArgs(
|
||||||
return (EFI_SUCCESS);
|
return (EFI_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TrimSpaces(&(CHAR16*)CommandLine);
|
||||||
Size = StrSize(CommandLine);
|
Size = StrSize(CommandLine);
|
||||||
TempParameter = AllocateZeroPool(Size);
|
TempParameter = AllocateZeroPool(Size);
|
||||||
if (TempParameter == NULL) {
|
if (TempParameter == NULL) {
|
||||||
|
@ -359,7 +360,6 @@ CreatePopulateInstallShellParametersProtocol (
|
||||||
//
|
//
|
||||||
// Populate Argc and Argv
|
// Populate Argc and Argv
|
||||||
//
|
//
|
||||||
TrimSpaces (&FullCommandLine);
|
|
||||||
Status = ParseCommandLineToArgs(FullCommandLine,
|
Status = ParseCommandLineToArgs(FullCommandLine,
|
||||||
&(*NewShellParameters)->Argv,
|
&(*NewShellParameters)->Argv,
|
||||||
&(*NewShellParameters)->Argc);
|
&(*NewShellParameters)->Argc);
|
||||||
|
|
Loading…
Reference in New Issue