aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore
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/xenstore
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/xenstore')
-rw-r--r--tools/xenstore/xenstored_core.c6
-rw-r--r--tools/xenstore/xenstored_domain.c11
-rw-r--r--tools/xenstore/xenstored_domain.h3
3 files changed, 8 insertions, 12 deletions
diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index b043ac45f8..1749740482 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -52,7 +52,7 @@
#include "hashtable.h"
-extern int xce_handle; /* in xenstored_domain.c */
+extern xc_evtchn *xce_handle; /* in xenstored_domain.c */
static bool verbose = false;
LIST_HEAD(connections);
@@ -323,7 +323,7 @@ static int initialize_set(fd_set *inset, fd_set *outset, int sock, int ro_sock,
set_fd(ro_sock, inset, &max);
set_fd(reopen_log_pipe[0], inset, &max);
- if (xce_handle != -1)
+ if (xce_handle != NULL)
set_fd(xc_evtchn_fd(xce_handle), inset, &max);
list_for_each_entry(conn, &connections, list) {
@@ -1901,7 +1901,7 @@ int main(int argc, char *argv[])
signal(SIGHUP, trigger_reopen_log);
- if (xce_handle != -1)
+ if (xce_handle != NULL)
evtchn_fd = xc_evtchn_fd(xce_handle);
/* Get ready to listen to the tools. */
diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_domain.c
index 7aa87cd022..654185d4bb 100644
--- a/tools/xenstore/xenstored_domain.c
+++ b/tools/xenstore/xenstored_domain.c
@@ -36,7 +36,7 @@
static xc_interface **xc_handle;
static evtchn_port_t virq_port;
-int xce_handle = -1;
+xc_evtchn *xce_handle = NULL;
struct domain
{
@@ -580,8 +580,7 @@ static int dom0_init(void)
return 0;
}
-/* Returns the event channel handle. */
-int domain_init(void)
+void domain_init(void)
{
int rc;
@@ -595,9 +594,9 @@ int domain_init(void)
talloc_set_destructor(xc_handle, close_xc_handle);
- xce_handle = xc_evtchn_open();
+ xce_handle = xc_evtchn_open(NULL, 0);
- if (xce_handle < 0)
+ if (xce_handle == NULL)
barf_perror("Failed to open evtchn device");
if (dom0_init() != 0)
@@ -606,8 +605,6 @@ int domain_init(void)
if ((rc = xc_evtchn_bind_virq(xce_handle, VIRQ_DOM_EXC)) == -1)
barf_perror("Failed to bind to domain exception virq port");
virq_port = rc;
-
- return xce_handle;
}
void domain_entry_inc(struct connection *conn, struct node *node)
diff --git a/tools/xenstore/xenstored_domain.h b/tools/xenstore/xenstored_domain.h
index f42a9f50ad..6a1e8be09b 100644
--- a/tools/xenstore/xenstored_domain.h
+++ b/tools/xenstore/xenstored_domain.h
@@ -40,8 +40,7 @@ void do_set_target(struct connection *conn, struct buffered_data *in);
/* domid */
void do_get_domain_path(struct connection *conn, const char *domid_str);
-/* Returns the event channel handle */
-int domain_init(void);
+void domain_init(void);
/* Returns the implicit path of a connection (only domains have this) */
const char *get_implicit_path(const struct connection *conn);