Add /odm/lib/hw to HAL search path
ODM HALs should be compiled into /odm/lib/hw on the ODM partition. BUG: 25653199 Change-Id: I23324d8e4dc82301cebd71bc40cdd2b73a678360
This commit is contained in:
parent
56941c9a92
commit
48f57ad4f4
1 changed files with 7 additions and 0 deletions
|
@ -31,9 +31,11 @@
|
|||
#if defined(__LP64__)
|
||||
#define HAL_LIBRARY_PATH1 "/system/lib64/hw"
|
||||
#define HAL_LIBRARY_PATH2 "/vendor/lib64/hw"
|
||||
#define HAL_LIBRARY_PATH3 "/odm/lib64/hw"
|
||||
#else
|
||||
#define HAL_LIBRARY_PATH1 "/system/lib/hw"
|
||||
#define HAL_LIBRARY_PATH2 "/vendor/lib/hw"
|
||||
#define HAL_LIBRARY_PATH3 "/odm/lib/hw"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -129,6 +131,11 @@ static int load(const char *id,
|
|||
static int hw_module_exists(char *path, size_t path_len, const char *name,
|
||||
const char *subname)
|
||||
{
|
||||
snprintf(path, path_len, "%s/%s.%s.so",
|
||||
HAL_LIBRARY_PATH3, name, subname);
|
||||
if (access(path, R_OK) == 0)
|
||||
return 0;
|
||||
|
||||
snprintf(path, path_len, "%s/%s.%s.so",
|
||||
HAL_LIBRARY_PATH2, name, subname);
|
||||
if (access(path, R_OK) == 0)
|
||||
|
|
Loading…
Reference in a new issue