diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-04-12 21:55:07 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-04-12 21:55:07 +0000 |
commit | 6878e7a7be6a29da75fca61ba42681fc64a3fdf3 (patch) | |
tree | b4b4e4df7635d4c1da30ad3b6ae0cc2e4d87970a /ShellPkg/Library/UefiShellDriver1CommandsLib | |
parent | eaf4f336ea42dc32e1a5b31d6b7822c125a15d34 (diff) | |
download | edk2-platforms-6878e7a7be6a29da75fca61ba42681fc64a3fdf3.tar.xz |
update Bcfg to correctly remove by option index not variable name and add driver order items properly.
update connect and reconnect to account for ignoring the child handle in the connect operation.
update disconnect to output correctly.
hexedit corrected to properly display status bar and title bar and refresh when required.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11525 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellDriver1CommandsLib')
5 files changed, 30 insertions, 12 deletions
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c index e4e780a437..429964d8c8 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c @@ -277,7 +277,8 @@ ShellCommandRunConnect ( //
// if more than 2 'value' parameters (plus the name one) or either -r or -c with any value parameters we have too many parameters
//
- if ((ShellCommandLineGetCount(Package) > 3)
+ Count = (gInReconnect?0x4:0x3);
+ if ((ShellCommandLineGetCount(Package) > Count)
||((ShellCommandLineGetFlag(Package, L"-r") || ShellCommandLineGetFlag(Package, L"-c")) && ShellCommandLineGetCount(Package)>1)
||(ShellCommandLineGetFlag(Package, L"-r") && ShellCommandLineGetFlag(Package, L"-c") )
){
@@ -328,17 +329,26 @@ ShellCommandRunConnect ( Param2 = ShellCommandLineGetRawValue(Package, 2);
Count = ShellCommandLineGetCount(Package);
- Status = ShellConvertStringToUint64(Param1, &Intermediate, TRUE, FALSE);
- Handle1 = ConvertHandleIndexToHandle((UINTN)Intermediate);
- if (EFI_ERROR(Status)) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, Param1);
- ShellStatus = SHELL_INVALID_PARAMETER;
+ if (Param1 != NULL) {
+ Status = ShellConvertStringToUint64(Param1, &Intermediate, TRUE, FALSE);
+ Handle1 = ConvertHandleIndexToHandle((UINTN)Intermediate);
+ if (EFI_ERROR(Status)) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, Param1);
+ ShellStatus = SHELL_INVALID_PARAMETER;
+ }
+ } else {
+ Handle1 = NULL;
}
- Status = ShellConvertStringToUint64(Param2, &Intermediate, TRUE, FALSE);
- Handle2 = ConvertHandleIndexToHandle((UINTN)Intermediate);
- if (EFI_ERROR(Status)) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, Param2);
- ShellStatus = SHELL_INVALID_PARAMETER;
+
+ if (Param2 != NULL) {
+ Status = ShellConvertStringToUint64(Param2, &Intermediate, TRUE, FALSE);
+ Handle2 = ConvertHandleIndexToHandle((UINTN)Intermediate);
+ if (EFI_ERROR(Status)) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, Param2);
+ ShellStatus = SHELL_INVALID_PARAMETER;
+ }
+ } else {
+ Handle2 = NULL;
}
if (ShellStatus == SHELL_SUCCESS) {
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Disconnect.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Disconnect.c index 3a19304b66..96233f9b53 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Disconnect.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Disconnect.c @@ -174,7 +174,7 @@ ShellCommandRunDisconnect ( } else {
ASSERT(Param1 != NULL);
Status = gBS->DisconnectController(Handle1, Handle2, Handle3);
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_3P_RESULT), gShellDriver1HiiHandle, L"Disconnect", Intermediate1, Intermediate2, Intermediate3, Status);
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_3P_RESULT), gShellDriver1HiiHandle, L"Disconnect", (UINTN)Intermediate1, (UINTN)Intermediate2, (UINTN)Intermediate3, Status);
}
}
}
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c index 0a8e1b2be8..e6a0fba20d 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c @@ -29,9 +29,14 @@ ShellCommandRunReconnect ( {
SHELL_STATUS ShellStatus;
+ gInReconnect = TRUE;
+
ShellStatus = ShellCommandRunDisconnect(ImageHandle, SystemTable);
if (ShellStatus == SHELL_SUCCESS) {
ShellStatus = ShellCommandRunConnect(ImageHandle, SystemTable);
}
+
+ gInReconnect = FALSE;
+
return (ShellStatus);
}
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.c index 1673d56880..d802a5d7d4 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.c @@ -16,6 +16,8 @@ STATIC CONST CHAR16 mFileName[] = L"Driver1Commands";
EFI_HANDLE gShellDriver1HiiHandle = NULL;
+BOOLEAN gInReconnect = FALSE;
+
CONST EFI_GUID gShellDriver1HiiGuid = \
{ \
0xaf0b742, 0x63ec, 0x45bd, {0x8d, 0xb6, 0x71, 0xad, 0x7f, 0x2f, 0xe8, 0xe8} \
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.h b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.h index 699053f2d8..61754a5477 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.h +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.h @@ -58,6 +58,7 @@ extern EFI_HANDLE gShellDriver1HiiHandle;
extern CONST EFI_GUID gShellDriver1HiiGuid;
+extern BOOLEAN gInReconnect;
/**
Function for 'connect' command.
|