summaryrefslogtreecommitdiff
path: root/kexec/kexec-xen.c
diff options
context:
space:
mode:
authorEric DeVolder <eric.devolder@oracle.com>2018-01-24 13:20:21 -0600
committerSimon Horman <horms@verge.net.au>2018-01-25 09:05:55 +0100
commit282ff2a5e613b8291b44848fad42904541a031c1 (patch)
tree9745626abd7e540b6d9859f73704539953b7fb7b /kexec/kexec-xen.c
parent58c225a6d762c332c05343f8fd5f5acea4ea538b (diff)
kexec-tools: Make xc_dlhandle static
This patch is a follow-on to commit 894bea93 "kexec-tools: Perform run-time linking of libxenctrl.so". This patch addresses feedback from Daniel Kiper. This patch implements Daniel's suggestion to make the xc_dlhandle variable static, insert missing 'extern' qualifier for the new __xc() wrappers, and correct some style issues. Signed-off-by: Eric DeVolder <eric.devolder@oracle.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec-xen.c')
-rw-r--r--kexec/kexec-xen.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/kexec/kexec-xen.c b/kexec/kexec-xen.c
index 75f8758..1887390 100644
--- a/kexec/kexec-xen.c
+++ b/kexec/kexec-xen.c
@@ -15,8 +15,17 @@
#include "crashdump.h"
#ifdef CONFIG_LIBXENCTRL_DL
-void *xc_dlhandle;
+#include <dlfcn.h>
+
+/* The handle from dlopen(), needed by dlsym(), dlclose() */
+static void *xc_dlhandle;
xc_hypercall_buffer_t XC__HYPERCALL_BUFFER_NAME(HYPERCALL_BUFFER_NULL);
+
+void *__xc_dlsym(const char *symbol)
+{
+ return dlsym(xc_dlhandle, symbol);
+}
+
xc_interface *__xc_interface_open(xentoollog_logger *logger,
xentoollog_logger *dombuild_logger,
unsigned open_flags)