diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2011-10-18 13:36:43 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2011-10-18 13:36:43 +0100 |
commit | 33ca1047cba8e385f9b9f433627ed6c116bd4157 (patch) | |
tree | a04a60a2ce3639fe711640528f5fadc14a5ebbe3 /tools | |
parent | 6dc92e085b34e9502e42a53fd6969c9af483a307 (diff) | |
download | xen-33ca1047cba8e385f9b9f433627ed6c116bd4157.tar.gz xen-33ca1047cba8e385f9b9f433627ed6c116bd4157.tar.bz2 xen-33ca1047cba8e385f9b9f433627ed6c116bd4157.zip |
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@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxl/gentest.py | 2 | ||||
-rw-r--r-- | tools/libxl/libxl.c | 3 | ||||
-rw-r--r-- | tools/libxl/libxl.h | 4 | ||||
-rw-r--r-- | tools/libxl/xl.c | 2 | ||||
-rw-r--r-- | tools/ocaml/libs/xl/xenlight_stubs.c | 2 | ||||
-rw-r--r-- | tools/python/xen/lowlevel/xl/xl.c | 2 |
6 files changed, 9 insertions, 6 deletions
diff --git a/tools/libxl/gentest.py b/tools/libxl/gentest.py index 24898b7a6e..05e77cce5e 100644 --- a/tools/libxl/gentest.py +++ b/tools/libxl/gentest.py @@ -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 --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 9af0804643..c0a1c58801 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -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 --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 0d85f843f4..ef25c5da6d 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -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 --git a/tools/libxl/xl.c b/tools/libxl/xl.c index 4600f8e5ed..7288f5f980 100644 --- a/tools/libxl/xl.c +++ b/tools/libxl/xl.c @@ -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 --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c index be05b8ea87..0944c5696f 100644 --- a/tools/ocaml/libs/xl/xenlight_stubs.c +++ b/tools/ocaml/libs/xl/xenlight_stubs.c @@ -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); diff --git a/tools/python/xen/lowlevel/xl/xl.c b/tools/python/xen/lowlevel/xl/xl.c index 005acd699d..aadbee877b 100644 --- a/tools/python/xen/lowlevel/xl/xl.c +++ b/tools/python/xen/lowlevel/xl/xl.c @@ -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; |