The CommandLine is executed from the current working directory on the current\r
device.\r
\r
- The EnvironmentVariables and Status parameters are ignored in a pre-UEFI Shell 2.0\r
+ The EnvironmentVariables pararemeter is ignored in a pre-UEFI Shell 2.0\r
environment. The values pointed to by the parameters will be unchanged by the\r
ShellExecute() function. The Output parameter has no effect in a\r
UEFI Shell 2.0 environment.\r
OUT EFI_STATUS *Status OPTIONAL\r
)\r
{\r
+ EFI_STATUS CmdStatus;\r
//\r
// Check for UEFI Shell 2.0 protocols\r
//\r
//\r
if (mEfiShellEnvironment2 != NULL) {\r
//\r
- // Call EFI Shell version (not using EnvironmentVariables or Status parameters)\r
+ // Call EFI Shell version.\r
// Due to oddity in the EFI shell we want to dereference the ParentHandle here\r
//\r
- return (mEfiShellEnvironment2->Execute(*ParentHandle,\r
+ CmdStatus = (mEfiShellEnvironment2->Execute(*ParentHandle,\r
CommandLine,\r
Output));\r
+ //\r
+ // No Status output parameter so just use the returned status\r
+ //\r
+ if (Status != NULL) {\r
+ *Status = CmdStatus;\r
+ }\r
+ //\r
+ // If there was an error, we can't tell if it was from the command or from\r
+ // the Execute() function, so we'll just assume the shell ran successfully\r
+ // and the error came from the command.\r
+ //\r
+ return EFI_SUCCESS;\r
}\r
\r
return (EFI_UNSUPPORTED);\r
}\r
+\r
/**\r
Retreives the current directory path\r
\r