mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:20:26 +08:00
refactor: Handle dlopen error
Related-To: NEO-13922 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
28c008e438
commit
42261526e4
@@ -85,6 +85,9 @@ std::string OsLibrary::getFullPath() {
|
||||
|
||||
bool isLibraryLoaded(const std::string &libraryName) {
|
||||
auto handle = SysCalls::dlopen(0, RTLD_LAZY);
|
||||
if (!handle) {
|
||||
return false;
|
||||
}
|
||||
struct link_map *map = nullptr;
|
||||
int retVal = NEO::SysCalls::dlinfo(handle, RTLD_DI_LINKMAP, &map);
|
||||
if (retVal == 0 && map != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user