summaryrefslogtreecommitdiffstats
path: root/hardware.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-09-30 14:23:01 -0700
committerColin Cross <ccross@android.com>2013-09-30 14:23:01 -0700
commitb0c303229fcbc89a0afa8f170de64f2a7fee9d6c (patch)
tree5885ecea516618a539e254f5abbf5f26e62675ec /hardware.c
parent89cfe20899d41e1c96efc20e3f203d3f1dba71cd (diff)
downloadhardware_libhardware-b0c303229fcbc89a0afa8f170de64f2a7fee9d6c.tar.gz
hardware_libhardware-b0c303229fcbc89a0afa8f170de64f2a7fee9d6c.tar.bz2
hardware_libhardware-b0c303229fcbc89a0afa8f170de64f2a7fee9d6c.zip
hardware: look in /vendor for default.so
Some vendors have their own HAL modules, which may need their default implementation stored in /vendor. Change-Id: I5337a61875023404a85029bbc59b984056b3e441
Diffstat (limited to 'hardware.c')
-rw-r--r--hardware.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hardware.c b/hardware.c
index 1f831cb..9651f4c 100644
--- a/hardware.c
+++ b/hardware.c
@@ -154,6 +154,10 @@ int hw_get_module_by_class(const char *class_id, const char *inst,
if (access(path, R_OK) == 0) break;
} else {
snprintf(path, sizeof(path), "%s/%s.default.so",
+ HAL_LIBRARY_PATH2, name);
+ if (access(path, R_OK) == 0) break;
+
+ snprintf(path, sizeof(path), "%s/%s.default.so",
HAL_LIBRARY_PATH1, name);
if (access(path, R_OK) == 0) break;
}