summaryrefslogtreecommitdiff
path: root/components/libdl
diff options
context:
space:
mode:
authorshaolin <[email protected]>2013-04-10 21:40:08 +0800
committershaolin <[email protected]>2013-04-10 21:40:08 +0800
commit83751c63e3aad965323ebc05a4f34260bc7f624b (patch)
tree350d19f1d7ac400f5c362a9ccb179a85bbf9a02f /components/libdl
parent06c6630bbfbf7a0b82ebf22d63bc2fc9aca3bdb9 (diff)
add error handler in dlopen.c
Diffstat (limited to 'components/libdl')
-rw-r--r--components/libdl/dlopen.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/libdl/dlopen.c b/components/libdl/dlopen.c
index 8271d2fd4e..5e063eed96 100644
--- a/components/libdl/dlopen.c
+++ b/components/libdl/dlopen.c
@@ -35,7 +35,12 @@ void* dlopen(const char *filename, int flags)
rt_snprintf(fullpath, strlen(def_path) + strlen(filename) + 2,
"%s/%s", def_path, filename);
}
-
+ else
+ {
+ rt_kprintf("use absolute path\n");
+ return RT_NULL;
+ }
+
/* find in module list */
module = rt_module_find(fullpath);