summaryrefslogtreecommitdiffstats
path: root/libvndksupport
diff options
context:
space:
mode:
authorJustin Yun <justinyun@google.com>2017-05-22 14:31:56 +0900
committerJustin Yun <justinyun@google.com>2017-05-24 01:32:51 +0000
commit17baed1012b6abd57e54caa902c0e28d9f0f087c (patch)
tree88962d7a07518a23275d0d737b1a98179c78e391 /libvndksupport
parent19b47ced71c79582eeb886047cb76599a2af7522 (diff)
downloadsystem_core-17baed1012b6abd57e54caa902c0e28d9f0f087c.tar.gz
system_core-17baed1012b6abd57e54caa902c0e28d9f0f087c.tar.bz2
system_core-17baed1012b6abd57e54caa902c0e28d9f0f087c.zip
libvndksupport: Do not lookup default namespace for sphal failure
Instead of looking up default namespace for the failure of loading sphal libs, report failure. This is only for the devices that have sphal namespace. Bug: 38435840 Test: sailfish builds and boots Test: libvndksupport-tests passes Change-Id: Ibbff5f2d5d83f6482f98677a5492777db6416967
Diffstat (limited to 'libvndksupport')
-rw-r--r--libvndksupport/linker.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libvndksupport/linker.c b/libvndksupport/linker.c
index d82307bb2..696e97817 100644
--- a/libvndksupport/linker.c
+++ b/libvndksupport/linker.c
@@ -30,21 +30,19 @@ void* android_load_sphal_library(const char* name, int flag) {
.flags = ANDROID_DLEXT_USE_NAMESPACE, .library_namespace = sphal_namespace,
};
void* handle = android_dlopen_ext(name, flag, &dlextinfo);
- if (handle) {
- return handle;
- } else {
- ALOGW(
- "Could not load %s from sphal namespace: %s. "
- "Falling back to loading it from the current namespace,",
+ if (!handle) {
+ ALOGE(
+ "Could not load %s from sphal namespace: %s. ",
name, dlerror());
}
+ return handle;
} else {
ALOGI(
"sphal namespace is not configured for this process. "
"Loading %s from the current namespace instead.",
name);
+ return dlopen(name, flag);
}
- return dlopen(name, flag);
}
int android_unload_sphal_library(void* handle) {