[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 27 of 27 v3] libxl: add a flags argument to libxl_ctx_alloc



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1318941403 -3600
# Node ID 12ac478d1b56f0ff4d3242138b780c551a69f107
# Parent  0bfe1face70308bbb72d5e3ce46e86f8933466f8
libxl: add a flags argument to libxl_ctx_alloc.

Currently unused but gives us scope for expansion in an ABI compatible manner
in the future.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 0bfe1face703 -r 12ac478d1b56 tools/libxl/gentest.py
--- a/tools/libxl/gentest.py    Tue Oct 18 13:36:43 2011 +0100
+++ b/tools/libxl/gentest.py    Tue Oct 18 13:36:43 2011 +0100
@@ -239,7 +239,7 @@ int main(int argc, char **argv)
     logger = xtl_createlogger_stdiostream(stderr, XTL_DETAIL, 0);
     if (!logger) exit(1);
 
-    if (libxl_ctx_alloc(&ctx, LIBXL_VERSION, (xentoollog_logger*)logger)) {
+    if (libxl_ctx_alloc(&ctx, LIBXL_VERSION, 0, (xentoollog_logger*)logger)) {
         fprintf(stderr, "cannot init xl context\\n");
         exit(1);
     }
diff -r 0bfe1face703 -r 12ac478d1b56 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Tue Oct 18 13:36:43 2011 +0100
+++ b/tools/libxl/libxl.c       Tue Oct 18 13:36:43 2011 +0100
@@ -39,7 +39,8 @@
 #define PAGE_TO_MEMKB(pages) ((pages) * 4)
 #define BACKEND_STRING_SIZE 5
 
-int libxl_ctx_alloc(libxl_ctx **pctx, int version, xentoollog_logger * lg)
+int libxl_ctx_alloc(libxl_ctx **pctx, int version,
+                    unsigned flags, xentoollog_logger * lg)
 {
     libxl_ctx *ctx;
     struct stat stat_buf;
diff -r 0bfe1face703 -r 12ac478d1b56 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Tue Oct 18 13:36:43 2011 +0100
+++ b/tools/libxl/libxl.h       Tue Oct 18 13:36:43 2011 +0100
@@ -245,7 +245,9 @@ typedef struct {
 } libxl_domain_config;
 
 /* context functions */
-int libxl_ctx_alloc(libxl_ctx **pctx, int version, xentoollog_logger *lg);
+int libxl_ctx_alloc(libxl_ctx **pctx, int version,
+                    unsigned flags /* none currently defined */,
+                    xentoollog_logger *lg);
 int libxl_ctx_free(libxl_ctx *ctx /* 0 is OK */);
 int libxl_ctx_postfork(libxl_ctx *ctx);
 
diff -r 0bfe1face703 -r 12ac478d1b56 tools/libxl/xl.c
--- a/tools/libxl/xl.c  Tue Oct 18 13:36:43 2011 +0100
+++ b/tools/libxl/xl.c  Tue Oct 18 13:36:43 2011 +0100
@@ -116,7 +116,7 @@ int main(int argc, char **argv)
     logger = xtl_createlogger_stdiostream(stderr, minmsglevel,  0);
     if (!logger) exit(1);
 
-    if (libxl_ctx_alloc(&ctx, LIBXL_VERSION, (xentoollog_logger*)logger)) {
+    if (libxl_ctx_alloc(&ctx, LIBXL_VERSION, 0, (xentoollog_logger*)logger)) {
         fprintf(stderr, "cannot init xl context\n");
         exit(1);
     }
diff -r 0bfe1face703 -r 12ac478d1b56 tools/ocaml/libs/xl/xenlight_stubs.c
--- a/tools/ocaml/libs/xl/xenlight_stubs.c      Tue Oct 18 13:36:43 2011 +0100
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c      Tue Oct 18 13:36:43 2011 +0100
@@ -59,7 +59,7 @@ static void log_destroy(struct xentoollo
        lg.logger.destroy = log_destroy; \
        lg.logger.progress = NULL; \
        caml_enter_blocking_section(); \
-       ret = libxl_ctx_alloc(&ctx, LIBXL_VERSION, (struct xentoollog_logger *) 
&lg); \
+       ret = libxl_ctx_alloc(&ctx, LIBXL_VERSION, 0, (struct xentoollog_logger 
*) &lg); \
        if (ret != 0) \
                failwith_xl("cannot init context", &lg);
 
diff -r 0bfe1face703 -r 12ac478d1b56 tools/python/xen/lowlevel/xl/xl.c
--- a/tools/python/xen/lowlevel/xl/xl.c Tue Oct 18 13:36:43 2011 +0100
+++ b/tools/python/xen/lowlevel/xl/xl.c Tue Oct 18 13:36:43 2011 +0100
@@ -687,7 +687,7 @@ PyXl_init(XlObject *self, PyObject *args
         return -1;
     }
 
-    if ( libxl_ctx_alloc(&self->ctx, LIBXL_VERSION,
+    if ( libxl_ctx_alloc(&self->ctx, LIBXL_VERSION, 0,
                 (xentoollog_logger*)self->logger) ) {
         PyErr_SetString(xl_error_obj, "cannot init xl context");
         return -1;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.