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
Opens a group of files based on a path.\r
\r
This function uses the Arg to open all the matching files. Each matched\r
- file has a SHELL_FILE_ARG structure to record the file information. These\r
- structures are placed on the list ListHead. Users can get the SHELL_FILE_ARG\r
+ file has a SHELL_FILE_INFO structure to record the file information. These\r
+ structures are placed on the list ListHead. Users can get the SHELL_FILE_INFO\r
structures from ListHead to access each file. This function supports wildcards\r
and will process '?' and '*' as such. the list must be freed with a call to\r
ShellCloseFileMetaArg().\r
//\r
gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);\r
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
- ASSERT_EFI_ERROR(Status);\r
+ if (EFI_ERROR(Status)) {\r
+ break;\r
+ }\r
ShellPrintEx(-1, -1, L"%c", Key.UnicodeChar);\r
if (Key.UnicodeChar == L'Q' || Key.UnicodeChar ==L'q') {\r
*Resp = ShellPromptResponseQuit;\r
}\r
gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);\r
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
- ASSERT_EFI_ERROR(Status);\r
+ if (EFI_ERROR(Status)) {\r
+ break;\r
+ }\r
ShellPrintEx(-1, -1, L"%c", Key.UnicodeChar);\r
switch (Key.UnicodeChar) {\r
case L'Y':\r
}\r
gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);\r
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
- ASSERT_EFI_ERROR(Status);\r
+ if (EFI_ERROR(Status)) {\r
+ break;\r
+ }\r
ShellPrintEx(-1, -1, L"%c", Key.UnicodeChar);\r
switch (Key.UnicodeChar) {\r
case L'Y':\r
gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);\r
if (Type == ShellPromptResponseTypeEnterContinue) {\r
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
- ASSERT_EFI_ERROR(Status);\r
+ if (EFI_ERROR(Status)) {\r
+ break;\r
+ }\r
ShellPrintEx(-1, -1, L"%c", Key.UnicodeChar);\r
if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) {\r
*Resp = ShellPromptResponseContinue;\r
}\r
gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);\r
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
- ASSERT_EFI_ERROR(Status);\r
+ if (EFI_ERROR(Status)) {\r
+ break;\r
+ }\r
ShellPrintEx(-1, -1, L"%c", Key.UnicodeChar);\r
switch (Key.UnicodeChar) {\r
case L'Y':\r
}\r
gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);\r
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
- ASSERT_EFI_ERROR(Status);\r
+ if (EFI_ERROR(Status)) {\r
+ break;\r
+ }\r
ShellPrintEx(-1, -1, L"%c", Key.UnicodeChar);\r
if (Key.UnicodeChar == CHAR_CARRIAGE_RETURN) {\r
break;\r