WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 27 of 27 v3] libxl: add a flags argument to libxl_ctx_alloc
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 18 Oct 2011 13:55:22 +0100
Cc: ian.jackson@xxxxxxxxxx
Delivery-date: Tue, 18 Oct 2011 06:31:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1318942495@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1318942495@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# 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

<Prev in Thread] Current Thread [Next in Thread>