From b0c303229fcbc89a0afa8f170de64f2a7fee9d6c Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 30 Sep 2013 14:23:01 -0700 Subject: 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 --- hardware.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hardware.c') diff --git a/hardware.c b/hardware.c index 1f831cb..9651f4c 100644 --- a/hardware.c +++ b/hardware.c @@ -153,6 +153,10 @@ int hw_get_module_by_class(const char *class_id, const char *inst, HAL_LIBRARY_PATH1, name, prop); 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; -- cgit v1.2.3