summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2011-09-09 10:33:06 -0700
committerEamon Walsh <ewalsh@tycho.nsa.gov>2011-09-09 10:33:06 -0700
commit8a2be2ce7b78dd01a5acb21103ae2f2019a57b61 (patch)
tree07bc3297125a116bb56443612f94635b0596972c
parent8a78498c9b30c45f72d572550338af3d3380f6b2 (diff)
Updates for libxl changes.HEADmaster
-rw-r--r--src/xen_monitor.c14
-rw-r--r--src/xen_server.c4
2 files changed, 8 insertions, 10 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))
diff --git a/src/xen_server.c b/src/xen_server.c
index 6758e63..731c175 100644
--- a/src/xen_server.c
+++ b/src/xen_server.c
@@ -61,7 +61,7 @@ struct dominfo {
TAILQ_HEAD(dominfo_list, dominfo);
static struct dominfo_list vchans = TAILQ_HEAD_INITIALIZER(vchans);
-static libxl_ctx ctx;
+static libxl_ctx *ctx;
static void vchan_queue(struct dominfo *d);
@@ -298,7 +298,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))