summaryrefslogtreecommitdiff
path: root/EdkUnixPkg/Dxe/UnixThunk/Bus/SimpleFileSystem/ComponentName.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkUnixPkg/Dxe/UnixThunk/Bus/SimpleFileSystem/ComponentName.c')
-rw-r--r--EdkUnixPkg/Dxe/UnixThunk/Bus/SimpleFileSystem/ComponentName.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/EdkUnixPkg/Dxe/UnixThunk/Bus/SimpleFileSystem/ComponentName.c b/EdkUnixPkg/Dxe/UnixThunk/Bus/SimpleFileSystem/ComponentName.c
index b4bbb328f4..347326dcb8 100644
--- a/EdkUnixPkg/Dxe/UnixThunk/Bus/SimpleFileSystem/ComponentName.c
+++ b/EdkUnixPkg/Dxe/UnixThunk/Bus/SimpleFileSystem/ComponentName.c
@@ -168,6 +168,17 @@ UnixSimpleFileSystemComponentNameGetControllerName (
}
//
+ // Make sure this driver is currently managing ControllerHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gUnixSimpleFileSystemDriverBinding.DriverBindingHandle,
+ &gEfiUnixIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return EFI_UNSUPPORTED;
+ }
+ //
// Get our context back
//
Status = gBS->OpenProtocol (