diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellDriver1CommandsLib/OpenInfo.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDriver1CommandsLib/OpenInfo.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/OpenInfo.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/OpenInfo.c index 368948307e..2922f42d1e 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/OpenInfo.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/OpenInfo.c @@ -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
|