Lines Matching refs:path
80 const char *path, in load() argument
98 strncmp(path, HAL_LIBRARY_PATH1, strlen(HAL_LIBRARY_PATH1)) == 0) { in load()
102 handle = dlopen(path, RTLD_NOW); in load()
105 handle = dlopen(path, RTLD_NOW); in load()
107 handle = android_load_sphal_library(path, RTLD_NOW); in load()
112 ALOGE("load: module=%s\n%s", path, err_str?err_str:"unknown"); in load()
147 id, path, hmi, handle); in load()
158 static bool __attribute__ ((unused)) path_in_path(const char *path, const char *in_path) { in path_in_path() argument
160 if (realpath(path, real_path) == NULL) return false; in path_in_path()
178 static int hw_module_exists(char *path, size_t path_len, const char *name, in hw_module_exists() argument
187 snprintf(path, path_len, "/apex/%s/%s/%s.%s.so", in hw_module_exists()
190 if (access(path, R_OK) == 0) in hw_module_exists()
197 snprintf(path, path_len, "%s/%s.%s.so", in hw_module_exists()
199 if (path_in_path(path, HAL_LIBRARY_PATH3) && access(path, R_OK) == 0) in hw_module_exists()
202 snprintf(path, path_len, "%s/%s.%s.so", in hw_module_exists()
204 if (path_in_path(path, HAL_LIBRARY_PATH2) && access(path, R_OK) == 0) in hw_module_exists()
208 snprintf(path, path_len, "%s/%s.%s.so", in hw_module_exists()
210 if (path_in_path(path, HAL_LIBRARY_PATH1) && access(path, R_OK) == 0) in hw_module_exists()
224 char path[PATH_MAX] = {0}; in hw_get_module_by_class() local
249 if (hw_module_exists(path, sizeof(path), name, prop) == 0) { in hw_get_module_by_class()
259 if (hw_module_exists(path, sizeof(path), name, prop) == 0) { in hw_get_module_by_class()
265 if (hw_module_exists(path, sizeof(path), name, "default") == 0) { in hw_get_module_by_class()
274 return load(class_id, path, module); in hw_get_module_by_class()