summaryrefslogtreecommitdiff
path: root/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c')
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c
index d10f9ab68e..81db085fd4 100644
--- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c
+++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c
@@ -160,7 +160,17 @@ WinNtConsoleComponentNameGetControllerName (
if (ChildHandle != NULL) {
return EFI_UNSUPPORTED;
}
-
+ //
+ // Make sure this driver is currently managing ControllerHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gWinNtConsoleDriverBinding.DriverBindingHandle,
+ &gEfiWinNtIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return EFI_UNSUPPORTED;
+ }
//
// Get out context back
//