summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c')
-rw-r--r--ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c51
1 files changed, 27 insertions, 24 deletions
diff --git a/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c b/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
index ab5613da54..17e48443ac 100644
--- a/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
+++ b/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.c
@@ -43,51 +43,54 @@ ShellCEntryLib (
)
{
INTN ReturnFromMain;
- EFI_SHELL_PARAMETERS_PROTOCOL *EfiShellParametersProtocol;
- EFI_SHELL_INTERFACE *EfiShellInterface;
- EFI_STATUS Status;
+ EFI_SHELL_PARAMETERS_PROTOCOL *EfiShellParametersProtocol;
+ EFI_SHELL_INTERFACE *EfiShellInterface;
+ EFI_STATUS Status;
- ReturnFromMain = -1;
+ ReturnFromMain = -1;
EfiShellParametersProtocol = NULL;
- EfiShellInterface = NULL;
+ EfiShellInterface = NULL;
- Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
- &gEfiShellParametersProtocolGuid,
- (VOID **)&EfiShellParametersProtocol,
- ImageHandle,
- NULL,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if (!EFI_ERROR(Status)) {
+ Status = SystemTable->BootServices->OpenProtocol (
+ ImageHandle,
+ &gEfiShellParametersProtocolGuid,
+ (VOID **)&EfiShellParametersProtocol,
+ ImageHandle,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ if (!EFI_ERROR (Status)) {
//
// use shell 2.0 interface
//
ReturnFromMain = ShellAppMain (
EfiShellParametersProtocol->Argc,
EfiShellParametersProtocol->Argv
- );
+ );
} else {
//
// try to get shell 1.0 interface instead.
//
- Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
- &gEfiShellInterfaceGuid,
- (VOID **)&EfiShellInterface,
- ImageHandle,
- NULL,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if (!EFI_ERROR(Status)) {
+ Status = SystemTable->BootServices->OpenProtocol (
+ ImageHandle,
+ &gEfiShellInterfaceGuid,
+ (VOID **)&EfiShellInterface,
+ ImageHandle,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ if (!EFI_ERROR (Status)) {
//
// use shell 1.0 interface
//
ReturnFromMain = ShellAppMain (
EfiShellInterface->Argc,
EfiShellInterface->Argv
- );
+ );
} else {
- ASSERT(FALSE);
+ ASSERT (FALSE);
}
}
+
return ReturnFromMain;
}