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
This commit is contained in:
jcarsey
2011-04-12 21:55:07 +00:00
parent eaf4f336ea
commit 6878e7a7be
9 changed files with 352 additions and 115 deletions

View File

@@ -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) {

View File

@@ -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);
}
}
}

View File

@@ -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);
}

View File

@@ -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} \

View File

@@ -58,6 +58,7 @@
extern EFI_HANDLE gShellDriver1HiiHandle;
extern CONST EFI_GUID gShellDriver1HiiGuid;
extern BOOLEAN gInReconnect;
/**
Function for 'connect' command.