ShellPkg: Fix 'EfiShellExecute' doesn't get command status correctly.
1. Add a new function 'RunShellCommand' to return command status, thus 'EfiShellExecute' can get the command return status of 'CommandLine'. 2. Refine the code logic of 'EfiShellExecute' to make the new image of shell be loaded only if 'Environment' isn't NULL. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Signed-off-by: Jin Eric <eric.jin@intel.com> Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18664 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -339,9 +339,10 @@ SetEnvironmentVariables(
|
||||
//
|
||||
// Copy the string into the Key, leaving the last character allocated as NULL to terminate
|
||||
//
|
||||
StrCpyS( Node->Key,
|
||||
StrnCpyS( Node->Key,
|
||||
StrStr(CurrentString, L"=") - CurrentString + 1,
|
||||
CurrentString
|
||||
CurrentString,
|
||||
StrStr(CurrentString, L"=") - CurrentString
|
||||
);
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user