Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

1) ShellPkg/Library/UefiHandleParsingLib
    a. UefiHandleParsingLib.c – ConvertHandleToHandleIndex() and ConvertHandleIndexToHandle()
        i. Update to work correctly when handles are destroyed due to driver disconnect operations.  Same handle index is never reused.
    b. UefiHandleParsingLib.c – ParseHandleDatabaseByRelationshipWithType() and ParseHandleDatabaseForChildControllers()
        i. Expand to handle Service Binding Protocol usage such as Network stack.
2) ShellPkg/Library/UefiShellDriver1CommandsLib
    a. DevTree.c – Fix bug where the same handle is shown more than once.
    b. Dh.c – Fix use of GetDriverName() and GetDriverImageName().  The status returned must always be evaluated. 
    c. Disconnect.c – Remove requirement that a handle being disconnected must support Device Path Protocol.  This prevents driver model handles without device paths from being disconnected (i.e. Network Stack)
    d. OpenInfo.c – Fix bug when showing open info about a ControllerHandle that has been destroyed due to a disconnect or an unload operation.
    e. UefiShellDriver1CommandsLib.uni – Fix “drivers” command formatting when handle indexes have more than 2 characters.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13786 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
mdkinney
2012-10-05 22:26:25 +00:00
parent c42c9cac8c
commit f330ff35dc
6 changed files with 241 additions and 124 deletions

View File

@ -48,6 +48,7 @@ TraverseHandleDatabase (
CHAR16 *TempString;
UINTN HandleIndex;
CONST CHAR16 *Name;
UINTN ControllerIndex;
if (TheHandle == NULL) {
return (EFI_INVALID_PARAMETER);
@ -98,9 +99,10 @@ TraverseHandleDatabase (
OpenTypeString = StringDriverEx; break;
default: OpenTypeString = StringUnknown; break;
}
HandleIndex = ConvertHandleToHandleIndex(OpenInfo[OpenInfoIndex].AgentHandle);
Name = GetStringNameFromHandle(OpenInfo[OpenInfoIndex].AgentHandle, NULL);
if (OpenInfo[OpenInfoIndex].ControllerHandle!=NULL) {
HandleIndex = ConvertHandleToHandleIndex(OpenInfo[OpenInfoIndex].AgentHandle);
Name = GetStringNameFromHandle(OpenInfo[OpenInfoIndex].AgentHandle, NULL);
ControllerIndex = ConvertHandleToHandleIndex(OpenInfo[OpenInfoIndex].ControllerHandle);
if (ControllerIndex != 0) {
ShellPrintHiiEx(
-1,
-1,
@ -108,7 +110,7 @@ TraverseHandleDatabase (
STRING_TOKEN(STR_OPENINFO_LINE),
gShellDriver1HiiHandle,
HandleIndex,
ConvertHandleToHandleIndex(OpenInfo[OpenInfoIndex].ControllerHandle),
ControllerIndex,
OpenInfo[OpenInfoIndex].OpenCount,
OpenTypeString,
Name