diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c index 730122d361..ae5f5c7155 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c @@ -10,10 +10,10 @@ #include "UefiShellDriver1CommandsLib.h"
-STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
- {L"-r", TypeFlag},
- {NULL, TypeMax}
- };
+STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
+ { L"-r", TypeFlag },
+ { NULL, TypeMax }
+};
/**
Connect all the possible console devices.
@@ -24,16 +24,15 @@ ConnectAllConsoles ( VOID
)
{
- ShellConnectFromDevPaths(L"ConInDev");
- ShellConnectFromDevPaths(L"ConOutDev");
- ShellConnectFromDevPaths(L"ErrOutDev");
+ ShellConnectFromDevPaths (L"ConInDev");
+ ShellConnectFromDevPaths (L"ConOutDev");
+ ShellConnectFromDevPaths (L"ErrOutDev");
- ShellConnectFromDevPaths(L"ErrOut");
- ShellConnectFromDevPaths(L"ConIn");
- ShellConnectFromDevPaths(L"ConOut");
+ ShellConnectFromDevPaths (L"ErrOut");
+ ShellConnectFromDevPaths (L"ConIn");
+ ShellConnectFromDevPaths (L"ConOut");
}
-
/**
Function for 'reconnect' command.
@@ -47,42 +46,43 @@ ShellCommandRunReconnect ( IN EFI_SYSTEM_TABLE *SystemTable
)
{
- SHELL_STATUS ShellStatus;
- LIST_ENTRY *Package;
- CHAR16 *ProblemParam;
- EFI_STATUS Status;
+ SHELL_STATUS ShellStatus;
+ LIST_ENTRY *Package;
+ CHAR16 *ProblemParam;
+ EFI_STATUS Status;
gInReconnect = TRUE;
- ShellStatus = SHELL_SUCCESS;
+ ShellStatus = SHELL_SUCCESS;
//
// initialize the shell lib (we must be in non-auto-init...)
//
- Status = ShellInitialize();
- ASSERT_EFI_ERROR(Status);
+ Status = ShellInitialize ();
+ ASSERT_EFI_ERROR (Status);
- Status = CommandInit();
- ASSERT_EFI_ERROR(Status);
+ Status = CommandInit ();
+ ASSERT_EFI_ERROR (Status);
//
// parse the command line
//
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
- if (EFI_ERROR(Status)) {
- if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"reconnect", ProblemParam);
- FreePool(ProblemParam);
+ if (EFI_ERROR (Status)) {
+ if ((Status == EFI_VOLUME_CORRUPTED) && (ProblemParam != NULL)) {
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"reconnect", ProblemParam);
+ FreePool (ProblemParam);
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
- ASSERT(FALSE);
+ ASSERT (FALSE);
}
} else {
- ShellStatus = ShellCommandRunDisconnect(ImageHandle, SystemTable);
+ ShellStatus = ShellCommandRunDisconnect (ImageHandle, SystemTable);
if (ShellStatus == SHELL_SUCCESS) {
- if (ShellCommandLineGetFlag(Package, L"-r")) {
- ConnectAllConsoles();
+ if (ShellCommandLineGetFlag (Package, L"-r")) {
+ ConnectAllConsoles ();
}
- ShellStatus = ShellCommandRunConnect(ImageHandle, SystemTable);
+
+ ShellStatus = ShellCommandRunConnect (ImageHandle, SystemTable);
}
}
@@ -90,4 +90,3 @@ ShellCommandRunReconnect ( return (ShellStatus);
}
-
|