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