From 98d8e6bc27f60347bffcce3cd66a5064026abc54 Mon Sep 17 00:00:00 2001 From: sangwook lee Date: Thu, 9 Mar 2023 11:33:24 +0900 Subject: [PATCH] Add proper log depends on 32 or 64 Change-Id: I04bd68e9ca758b4e74e6d22e55742f6420e76171 Signed-off-by: sangwook lee --- src/plugin.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/plugin.c b/src/plugin.c index 222e9e3..ee14893 100755 --- a/src/plugin.c +++ b/src/plugin.c @@ -101,7 +101,12 @@ static int load_plugin_not_default() //g_plugin_handle = dlopen ( PLUGIN_PATH, RTLD_NOW ); if ( g_plugin_handle == NULL ) { - E ( "failed to dlopen(%s). error: %s\n", PLUGIN_PATH, dlerror() ); + if ((int)(sizeof(void_pointer)) == 8) { + E ( "failed to dlopen(%s). error: %s\n", PLUGIN_PATH64, dlerror() ); + } + else { + E ( "failed to dlopen(%s). error: %s\n", PLUGIN_PATH, dlerror() ); + } return 0; } @@ -167,6 +172,7 @@ void readxml() { void load_sdbd_plugin() { int ret; + void* void_pointer; plugin_cmd_hashtable = hashtable_create ( ht_size_31 ); @@ -179,8 +185,12 @@ void load_sdbd_plugin() I ( "using default plugin interface.\n" ); } else { - D ( "using sdbd plugin interface.(%s)\n", PLUGIN_PATH ); - + if ((int)(sizeof(void_pointer)) == 8) { + D ( "using sdbd plugin interface.(%s)\n", PLUGIN_PATH64 ); + } + else { + D ( "using sdbd plugin interface.(%s)\n", PLUGIN_PATH ); + } plugin_init_proc ( plugin_event_handler, plugin_register_command ); readxml(); } -- 2.34.1