From 5cc436c1d2b3b0be3f42104582f53eec3969b43a Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 28 May 2010 09:30:19 +0100 Subject: libxc: eliminate static variables, use xentoollog; API change This patch eliminate the global variables in libxenctrl (used for logging and error reporting). Instead the information which was in the global variables is now in a new xc_interface* opaque structure, which xc_interface open returns instead of the raw file descriptor; furthermore, logging is done via xentoollog. There are three new parameters to xc_interface_open to control the logging, but existing callers can just pass "0" for all three to get the old behaviour. All libxc callers have been adjusted accordingly. Also update QEMU_TAG for corresponding qemu change. Signed-off-by: Ian Jackson --- .../gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c | 2 +- tools/debugger/xenitp/xenitp.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tools/debugger') diff --git a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c index 8b0b6d944a..8b29135185 100644 --- a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c +++ b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c @@ -39,7 +39,7 @@ #define TRACE_ENTER /* printf("enter %s\n", __FUNCTION__) */ -static int xc_handle; +static xc_interface *xc_handle; static inline int curvcpuid() diff --git a/tools/debugger/xenitp/xenitp.c b/tools/debugger/xenitp/xenitp.c index 847d7bd7a6..812810c02f 100644 --- a/tools/debugger/xenitp/xenitp.c +++ b/tools/debugger/xenitp/xenitp.c @@ -40,7 +40,7 @@ #include #endif -static int xc_handle = 0; +static xc_interface *xc_handle = 0; static int domid = 0; static vcpu_guest_context_t *cur_ctx; static int cur_vcpu; @@ -59,7 +59,7 @@ static int cur_vcpu; int virt_to_phys (int is_inst, unsigned long vaddr, unsigned long *paddr); /* wrapper for vcpu_gest_context_any_t */ -static int xc_ia64_vcpu_getcontext(int xc_handle, +static int xc_ia64_vcpu_getcontext(xc_interface *xc_handle, uint32_t domid, uint32_t vcpu, vcpu_guest_context_t *ctxt) @@ -660,10 +660,10 @@ void print_tr (vcpu_guest_context_t *ctx) int lock_pages (void *addr, size_t len); void unlock_pages (void *addr, size_t len); -int do_xen_hypercall (int xc_handle, privcmd_hypercall_t *hypercall); +int do_xen_hypercall (xc_interface *xc_handle, privcmd_hypercall_t *hypercall); #ifdef HAVE_DEBUG_OP -static int do_ia64_debug_op (int xc_handle, +static int do_ia64_debug_op (xc_interface *xc_handle, unsigned long cmd, unsigned long domain, xen_ia64_debug_op_t *op) { @@ -1663,7 +1663,7 @@ void xenitp (int vcpu) } } - xc_interface_close (xc_handle); + ret = xc_interface_close (xc_handle); if (ret < 0) { perror ("xc_interface_close"); exit (-1); -- cgit v1.2.3