info = _hal_api_conf_get_module_info(module);
if (info == NULL) {
- _E("Failed to get module inforamtion\n");
+ _E("Failed to get HAL module(%d) information\n", module);
return NULL;
}
#endif
if (!library_name) {
- _E("%s backend library name is NULL\n",
- info->module_name);
+ _E("%s backend library name is NULL\n", info->module_name);
return NULL;
}
return library_name;
info = _hal_api_conf_get_module_info(module);
if (info == NULL) {
- _E("Failed to get module information\n");
+ _E("Failed to get HAL module(%d) information\n", module);
return NULL;
}
if (!info->symbol_name) {
- _E("%s backend library name is NULL\n",
- info->module_name);
+ _E("%s backend library name is NULL\n", info->module_name);
return NULL;
}
info = _hal_api_conf_get_module_info(module);
if (info == NULL) {
- _E("Failed to get module information\n");
+ _E("Failed to get HAL module(%d) information\n", module);
ret = TIZEN_ERROR_UNKNOWN;
goto err;
}
/* Load module */
library_name = hal_common_get_backend_library_name(module);
if (!library_name) {
- _E("Failed to get backend library name of %s\n",
+ _E("%s: Failed to get backend library name\n",
info->module_name);
return TIZEN_ERROR_INVALID_PARAMETER;
}
handle = dlopen(library_name, RTLD_LAZY);
if (!handle) {
- _E("Failed to load shared library (%s)\n", dlerror());
+ _E("%s: Failed to load shared library (%s)\n",
+ info->module_name, dlerror());
return TIZEN_ERROR_INVALID_PARAMETER;
}
symbol_name = hal_common_get_backend_symbol_name(module);
if (!symbol_name) {
- _E("Failed to get backend symbol name of %s\n",
+ _E("%s: Failed to get backend symbol name\n",
info->module_name);
ret = TIZEN_ERROR_INVALID_PARAMETER;
goto err;
backend = dlsym(handle, symbol_name);
if (!backend) {
- _E("Failed to find backend data (%s)\n", dlerror());
+ _E("%s: Failed to find backend data (%s)\n",
+ info->module_name, dlerror());
ret = TIZEN_ERROR_INVALID_PARAMETER;
goto err;
}
- /* Print backend module and vendor name */
-
/* Check HAL ABI Version */
ret = hal_common_check_backend_abi_version(module, backend->abi_version);
if (ret < 0) {
- _E("Failed to check ABI version of %s\n",
+ _E("%s: Failed to check ABI version\n",
info->module_name);
ret = TIZEN_ERROR_INVALID_PARAMETER;
goto err;
/* Get the backend module data */
if (!backend->init) {
- _E("hal_backend->init() is NULL for %s\n",
+ _E("%s: hal_backend->init() is NULL\n",
info->module_name);
ret = TIZEN_ERROR_INVALID_PARAMETER;
goto err;
ret = backend->init(data);
if (ret < 0) {
- _E("Failed to initialize backend: name(%s)/vendor(%s)\n",
- backend->name, backend->vendor);
+ _E("%s: Failed to initialize backend: name(%s)/vendor(%s)\n",
+ info->module_name, backend->name, backend->vendor);
ret = TIZEN_ERROR_INVALID_PARAMETER;
goto err;
}
info->library_backend = backend;
info->library_handle = handle;
- _I("Get HAL backend: name(%s)/vendor(%s)\n",
- backend->name, backend->vendor);
+ _I("%s: Get HAL backend: name(%s)/vendor(%s)\n",
+ info->module_name, backend->name, backend->vendor);
return TIZEN_ERROR_NONE;
err:
info = _hal_api_conf_get_module_info(module);
if (info == NULL) {
- _E("Failed to get module information\n");
+ _E("Failed to get HAL module(%d) information\n", module);
return TIZEN_ERROR_UNKNOWN;
}
handle = info->library_handle;
if (!backend) {
- _I("Already fully put for HAL module (%d)\n", module);
+ _I("%s: Already fully put for HAL module\n", info->module_name);
return TIZEN_ERROR_NONE;
}
if (backend->exit) {
ret = backend->exit(data);
if (ret < 0) {
- _E("Failed to exit backend: name(%s)/vendor(%s)\n",
- backend->name, backend->vendor);
+ _E("%s: Failed to exit backend: name(%s)/vendor(%s)\n",
+ info->module_name, backend->name, backend->vendor);
return TIZEN_ERROR_INVALID_PARAMETER;
}
}
- _I("Put HAL backend: name(%s)/vendor(%s)\n",
- backend->name, backend->vendor);
+ _I("%s: Put HAL backend: name(%s)/vendor(%s)\n",
+ info->module_name, backend->name, backend->vendor);
if (handle)
dlclose(handle);
/* Check parameter whether is valid or not */
if (module <= HAL_MODULE_UNKNOWN || module >= HAL_MODULE_END) {
- _E("Invalid paramer of HAL module (%d)\n", module);
+ _E("Invalid paramer of HAL module(%d)\n", module);
return TIZEN_ERROR_INVALID_PARAMETER;
}
if (abi_version <= HAL_ABI_VERSION_UNKNOWN
|| abi_version >= HAL_ABI_VERSION_END) {
- _E("Invalid paramer of HAL ABI version (%d)\n", abi_version);
+ _E("Invalid paramer of HAL ABI version(%d) for HAL module(%d)\n",
+ abi_version, module);
return TIZEN_ERROR_INVALID_PARAMETER;
}
info = _hal_api_conf_get_module_info(module);
if (info == NULL) {
- _E("Failed to get module information\n");
+ _E("Failed to get HAL module(%d) information\n", module);
return TIZEN_ERROR_UNKNOWN;
}
/* Check abi_version whether is supported or not */
if (!info->hal_api) {
- _E("HAL module(%d) doesn't support HAL API\n", module);
+ _E("%s: Doesn't support HAL API\n", info->module_name);
return TIZEN_ERROR_INVALID_PARAMETER;
}
if (!info->num_abi_versions
|| !info->abi_versions) {
- _E("HAL module(%d) doesn't have the ABI version information\n",
- module);
+ _E("%s: Doesn't have the ABI version information\n",
+ info->module_name);
return TIZEN_ERROR_INVALID_PARAMETER;
}
if (data->backend_min_abi_version <= HAL_ABI_VERSION_UNKNOWN ||
data->backend_min_abi_version >= HAL_ABI_VERSION_END) {
- _E("wrong data in backend_min_abi_version %d\n",
- data->backend_min_abi_version);
+ _E("%s: abi_versions[%d].backend_min_abi_version(%d) is invalid\n",
+ info->module_name, i, data->backend_min_abi_version);
return TIZEN_ERROR_INVALID_PARAMETER;
}
&& abi_version >= data->backend_min_abi_version)
return TIZEN_ERROR_NONE;
- _E("%s doesn't support %s of HAL Backend\n", hal_abi_version_str[g_platform_curr_abi_version],
+ _E("%s: \'%s\' doesn't support \'%s\'\n",
+ info->module_name,
+ hal_abi_version_str[g_platform_curr_abi_version],
hal_abi_version_str[abi_version]);
- _E("Must use the following ABI versions from %s to %s\n",
+ _E("%s: Must use ABI versions from \'%s\' to \'%s\'\n",
+ info->module_name,
hal_abi_version_str[data->backend_min_abi_version],
hal_abi_version_str[data->platform_abi_version]);
}