Print the error message returned from dlerror as trace.

-- 
Sonny Karlsson
>From 90bcb6eb9e36d3a6df38d503c1cc393cae73ee46 Mon Sep 17 00:00:00 2001
From: Sonny Karlsson <[email protected]>
Date: Sun, 27 Jan 2013 19:04:50 +0100
Subject: [PATCH 1/2] plugin: Add mk_plugin_load_symbol trace message.


Signed-off-by: Sonny Karlsson <[email protected]>
---
 src/mk_plugin.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mk_plugin.c b/src/mk_plugin.c
index 37ed98f..9e2e465 100644
--- a/src/mk_plugin.c
+++ b/src/mk_plugin.c
@@ -68,12 +68,14 @@ void *mk_plugin_load(const char *path)
 
 void *mk_plugin_load_symbol(void *handler, const char *symbol)
 {
-    char *err;
+    const char *err;
     void *s;
 
     dlerror();
     s = dlsym(handler, symbol);
-    if (dlerror() != NULL) {
+    err = dlerror();
+    if (err) {
+        MK_TRACE("dlsym on '%s' failed: %s", symbol, err);
         return NULL;
     }
 
-- 
1.7.10.4

_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to