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