From 3e446a35ee82c738367e8f90e3bc9166687043a8 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 23 Dec 2010 15:25:57 +0000 Subject: libxc: convert evtchn interfaces to use an opaque handle type This makes the interface consistent with the changes made to the main interface in 21483:779c0ef9682c. Also fix some references to "struct xc_interface" which should have been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to pull in the corresponding qemu change. Signed-off-by: Ian Campbell Signed-off-by: Ian Jackson --- tools/xenmon/xenbaked.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools/xenmon') diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c index 478fac2bcb..985f1dd123 100644 --- a/tools/xenmon/xenbaked.c +++ b/tools/xenmon/xenbaked.c @@ -268,7 +268,7 @@ static void log_event(int event_id) } int virq_port; -int xce_handle = -1; +xc_evtchn *xce_handle = NULL; /* Returns the event channel handle. */ /* Stolen from xenstore code */ @@ -280,16 +280,16 @@ static int eventchn_init(void) if (0) return -1; - xce_handle = xc_evtchn_open(); + xce_handle = xc_evtchn_open(NULL, 0); - if (xce_handle < 0) + if (xce_handle == NULL) perror("Failed to open evtchn device"); if ((rc = xc_evtchn_bind_virq(xce_handle, VIRQ_TBUF)) == -1) perror("Failed to bind to domain exception virq port"); virq_port = rc; - return xce_handle; + return xce_handle == NULL ? -1 : 0; } static void wait_for_event(void) @@ -300,7 +300,7 @@ static void wait_for_event(void) struct timeval tv; int evtchn_fd; - if (xce_handle < 0) { + if (xce_handle == NULL) { nanosleep(&opts.poll_sleep, NULL); return; } -- cgit v1.2.3