libxl: add a flags argument to libxl_ctx_alloc.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 18 Oct 2011 12:36:43 +0000 (13:36 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 18 Oct 2011 12:36:43 +0000 (13:36 +0100)
Currently unused but gives us scope for expansion in an ABI compatible manner
in the future.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
tools/libxl/gentest.py
tools/libxl/libxl.c
tools/libxl/libxl.h
tools/libxl/xl.c
tools/ocaml/libs/xl/xenlight_stubs.c
tools/python/xen/lowlevel/xl/xl.c

index 24898b7a6ecbb1eafd2d3c9a98d0d14d80af0c05..05e77cce5e350cf41805b31990291ff53450f129 100644 (file)
@@ -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);
     }
index 9af080464376a64d686da1482dcb3c2079adc3b5..c0a1c588014c6193de98e2b57bd3cb10cd093fa2 100644 (file)
@@ -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;
index 0d85f843f48ea6e9cde2818016870ecb6dd94adc..ef25c5da6d4242d03e134e34e7bb0c6a4a608a70 100644 (file)
@@ -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);
 
index 4600f8e5ed458d78e8e951a1a3ac0b77a4f132cb..7288f5f980991f183d4a0010fd34557d414b08db 100644 (file)
@@ -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);
     }
index be05b8ea8723cf16658480e894d42c27f069c3a9..0944c5696f49c42c5fd8cc4acac267209d692ccd 100644 (file)
@@ -59,7 +59,7 @@ static void log_destroy(struct xentoollog_logger *logger)
        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);
 
index 005acd699de129756c9d9c4703cf9a4115b737d0..aadbee877bd884dd50e3fb4a1282e84984f21e5d 100644 (file)
@@ -687,7 +687,7 @@ PyXl_init(XlObject *self, PyObject *args, PyObject *kwds)
         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;