search for: failwith_xl

Displaying 3 results from an estimated 3 matches for "failwith_xl".

2010 Jun 28
8
[PATCH] add xl ocaml bindings
...l/signals.h> +#include <caml/fail.h> +#include <caml/callback.h> + +#include <sys/mman.h> +#include <stdint.h> +#include <string.h> + +#include "libxl.h" + +#define INIT_CTX() \ + ret = libxl_ctx_init(&ctx, LIBXL_VERSION, NULL); \ + if (ret != 0) \ + failwith_xl("cannot init context"); + +#define FREE_CTX() \ + libxl_ctx_free(&ctx) + +void log_callback(void *userdata, int loglevel, const char *file, + int line, const char *func, char *s) +{ +} + +void failwith_xl(char *log_data) +{ + char s[1024]; + snprintf(s, 1024, "proper logging no...
2013 Mar 25
86
[PATCH 00/28] libxl: ocaml: improve the bindings
The following series of patches fill in most of the gaps in the OCaml bindings to libxl, to make them useful for clients such as xapi/xenopsd (from XCP). There are a number of bugfixes to the existing bindings as well. I have an experimental version of xenopsd that successfully uses the new bindings. An earlier version of the first half of the series was submitted to the last by Ian Campbell on
2012 Nov 20
0
[PATCH 15 of 15] libxl: ocaml: add bindings for libxl_domain_create_new
...eturn(Val_unit); } +value stub_xl_domain_create_new(value ctx, value domain_config) +{ + CAMLparam2(ctx, domain_config); + int ret; + libxl_domain_config c_dconfig; + uint32_t c_domid; + + ret = libxl_domain_create_new(CTX, &c_dconfig, &c_domid, + NULL, NULL); + if (ret != 0) + failwith_xl(ret, "domain_create_new"); + + libxl_domain_config_dispose(&c_dconfig); + + CAMLreturn(Val_int(c_domid)); +} + /* * Local variables: * indent-tabs-mode: t diff -r 41f0137955f4 -r 72376896ba08 tools/ocaml/test/Makefile --- a/tools/ocaml/test/Makefile Tue Nov 20 17:22:21 2012 +000...