summaryrefslogtreecommitdiff
path: root/src/xen_monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xen_monitor.c')
-rw-r--r--src/xen_monitor.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/xen_monitor.c b/src/xen_monitor.c
index ca576ad..0c8c1be 100644
--- a/src/xen_monitor.c
+++ b/src/xen_monitor.c
@@ -36,7 +36,7 @@
#include "xen_linpicker.h"
#include "sys-queue.h"
-static libxl_ctx ctx;
+static libxl_ctx *ctx;
/* -------------------------------------------------------------------- */
@@ -54,8 +54,8 @@ static void
domain_shutdown(int domid)
{
/* XXX these don't actually, you know, work */
- libxl_device_vfb_hard_shutdown(&ctx, domid);
- libxl_device_vkb_hard_shutdown(&ctx, domid);
+ libxl_device_vfb_hard_shutdown(ctx, domid);
+ libxl_device_vkb_hard_shutdown(ctx, domid);
}
static int
@@ -70,23 +70,21 @@ domain_setup(struct xs_handle *xenstore, int domid, int newdom)
libxl_device_vfb vfb = {
.backend_domid = myself,
- .domid = domid,
.devid = 0,
.vnclisten = ""
};
libxl_device_vkb vkb = {
.backend_domid = myself,
- .domid = domid,
.devid = 0,
};
/* set up backend devices */
if (newdom) {
- rc = libxl_device_vfb_add(&ctx, domid, &vfb);
+ rc = libxl_device_vfb_add(ctx, domid, &vfb);
if (rc != 0)
return rc;
- rc = libxl_device_vkb_add(&ctx, domid, &vkb);
+ rc = libxl_device_vkb_add(ctx, domid, &vkb);
if (rc != 0)
return rc;
}
@@ -146,7 +144,7 @@ int
xen_linpicker_init(struct xs_handle *xenstore, xc_interface* xen_xc)
{
/* setup */
- libxl_ctx_init(&ctx, LIBXL_VERSION, 0);
+ libxl_ctx_alloc(&ctx, LIBXL_VERSION, 0);
/* watch for domain add/remove */
if (!xs_watch(xenstore, "/local/domain", LINPICKER_TOKEN))