aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenmon
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-12-23 15:25:57 +0000
committerIan Campbell <ian.campbell@citrix.com>2010-12-23 15:25:57 +0000
commit3e446a35ee82c738367e8f90e3bc9166687043a8 (patch)
treed2ed5fd210a798cb5c54007a08e8bd2b9e9a221f /tools/xenmon
parent252cb308e37470915d0f64c730e4e2e829ec2512 (diff)
downloadxen-3e446a35ee82c738367e8f90e3bc9166687043a8.tar.gz
xen-3e446a35ee82c738367e8f90e3bc9166687043a8.tar.bz2
xen-3e446a35ee82c738367e8f90e3bc9166687043a8.zip
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 <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/xenmon')
-rw-r--r--tools/xenmon/xenbaked.c10
1 files changed, 5 insertions, 5 deletions
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;
}