Before loading the library, check wehter HAL backend library
exists or not into /hal/lib/ or /hal/lib64/.
Change-Id: Ibf5c1fd493f785ac8e916eabb285cfad68ea19b0
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
goto err;
}
+ ret = access(library_name, F_OK);
+ if (ret < 0) {
+ _E("%s: Failed to find backend library (%s)\n",
+ info->module_name, library_name);
+ ret = TIZEN_ERROR_INVALID_PARAMETER;
+ goto err;
+ }
+
handle = dlopen(library_name, RTLD_LAZY);
if (!handle) {
- _E("%s: Failed to load shared library (%s)\n",
+ _E("%s: Failed to load backend library (%s)\n",
info->module_name, dlerror());
ret = TIZEN_ERROR_INVALID_PARAMETER;
goto err;