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 --- tools/xenstat/libxenstat/src/xenstat.c | 4 ++-- tools/xenstat/libxenstat/src/xenstat_priv.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/xenstat') diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxenstat/src/xenstat.c index 60b1a50a94..2791cc1d30 100644 --- a/tools/xenstat/libxenstat/src/xenstat.c +++ b/tools/xenstat/libxenstat/src/xenstat.c @@ -100,8 +100,8 @@ xenstat_handle *xenstat_init(void) } #endif - handle->xc_handle = xc_interface_open(); - if (handle->xc_handle == -1) { + handle->xc_handle = xc_interface_open(0,0,0); + if (!handle->xc_handle) { perror("xc_interface_open"); free(handle); return NULL; diff --git a/tools/xenstat/libxenstat/src/xenstat_priv.h b/tools/xenstat/libxenstat/src/xenstat_priv.h index 81beec1d8e..fdd70ed6e4 100644 --- a/tools/xenstat/libxenstat/src/xenstat_priv.h +++ b/tools/xenstat/libxenstat/src/xenstat_priv.h @@ -33,7 +33,7 @@ #define VERSION_SIZE (2 * SHORT_ASC_LEN + 1 + sizeof(xen_extraversion_t) + 1) struct xenstat_handle { - int xc_handle; + xc_interface *xc_handle; struct xs_handle *xshandle; /* xenstore handle */ int page_size; void *priv; -- cgit v1.2.3