Displaying 20 results from an estimated 139 matches for "camllocal1".
2017 Feb 07
0
[PATCH v2 2/7] Move xml and xpath_helpers OCAML code to mllib
...ree_xpathobjptr (value xpathobjv)
{
CAMLparam1 (xpathobjv);
xmlXPathObjectPtr xpathobj = xpathobjptr_val (xpathobjv);
@@ -106,7 +107,7 @@ v2v_xml_free_xpathobjptr (value xpathobjv)
}
value
-v2v_xml_parse_memory (value xmlv)
+mllib_xml_parse_memory (value xmlv)
{
CAMLparam1 (xmlv);
CAMLlocal1 (docv);
@@ -128,7 +129,7 @@ v2v_xml_parse_memory (value xmlv)
}
value
-v2v_xml_copy_doc (value docv, value recursivev)
+mllib_xml_copy_doc (value docv, value recursivev)
{
CAMLparam2 (docv, recursivev);
CAMLlocal1 (copyv);
@@ -147,7 +148,7 @@ v2v_xml_copy_doc (value docv, value recursive...
2014 Aug 26
3
Segmentation fault when trying to add binding
...========
diff --git a/v2v/xml-c.c b/v2v/xml-c.c
index 4c9bc77..a917c24 100644
--- a/v2v/xml-c.c
+++ b/v2v/xml-c.c
@@ -141,6 +141,16 @@ v2v_xml_xpath_new_context (value docv)
}
value
+v2v_xml_xpath_register_ns (value prefix, value uri, value xpathctx)
+{
+ CAMLparam3 (prefix, uri, xpathctx);
+ CAMLlocal1 (retval);
+ retval = xmlXPathRegisterNs (BAD_CAST String_val (prefix), BAD_CAST String_val (uri), xpathctx);
+
+ CAMLreturn (retval);
+}
+
+value
v2v_xml_xpath_eval_expression (value xpathctxv, value exprv)
{
CAMLparam2 (xpathctxv, exprv);
diff --git a/v2v/xml.ml b/v2v/xml.ml
index 78cb022.....
2019 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
...quot;) { "Secret_val (secv) = NULL;" }
+ else {
+ die "unknown short name $_"
+ }
+}
+
+# Generate the C body for each signature (class of function).
+
+sub gen_c_code
+{
+ my $sig = shift;
+ my $c_name = shift;
+
+ if ($sig =~ /^(\w+) : string$/) {
+ "\
+ CAMLlocal1 (rv);
+ " . gen_unpack_args ($1) . "
+ char *r;
+
+ NONBLOCKING (r = $c_name ($1));
+ CHECK_ERROR (!r, \"$c_name\");
+
+ rv = caml_copy_string (r);
+ free (r);
+ CAMLreturn (rv);
+"
+ } elsif ($sig =~ /^(\w+) : static string$/) {
+ "\
+ CAMLlocal1 (rv);
+ &...
2019 Dec 16
3
[v2v PATCH 0/2] Move libvirt-ocaml copy to v2v repo
libvirt-ocaml is used only by virt-v2v, so move it to this repository,
instead of having it around in the common submodule.
The removal from common will happen later.
Pino Toscano (2):
common: Bundle the libvirt-ocaml library for use by virt-v2v
build: switch embedded copy of libvirt-ocaml
.gitignore | 2 +
3rdparty/libvirt-ocaml/Makefile.am |
2019 May 17
1
Re: [nbdkit PATCH v2 08/24] ocaml: Implement .cache script callback
On Wed, May 15, 2019 at 10:57:58PM -0500, Eric Blake wrote:
> +static int
> +can_cache_wrapper (void *h)
> +{
> + CAMLparam0 ();
> + CAMLlocal1 (rv);
> +
> + caml_leave_blocking_section ();
> +
> + rv = caml_callback_exn (can_cache_fn, *(value *) h);
> + if (Is_exception_result (rv)) {
> + nbdkit_error ("%s", caml_format_exception (Extract_exception (rv)));
> + caml_enter_blocking_section ();
> +...
2019 May 20
8
[PATCH v5 0/7] v2v: switch to ocaml-libvirt
Hi,
this series switches virt-2v to ocaml-libvirt, embedding the latest
version of it from git. This way, it is possible to improve the way
v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).
As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.
I could not test all
2018 Nov 27
8
[PATCH v2 0/7] RFC: switch v2v to ocaml-libvirt
Hi,
this is a mostly done attempt to switch to ocaml-libvirt, embedding the
latest version of it from git. This way, it is possible to improve the
way v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).
As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.
I could not
2019 Jan 30
8
[PATCH v3 0/7] RFC: switch v2v to ocaml-libvirt
Hi,
this is a mostly done attempt to switch to ocaml-libvirt, embedding the
latest version of it from git. This way, it is possible to improve the
way v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).
As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.
I could not
2019 Apr 08
12
[PATCH 43 0/7] v2v: switch to ocaml-libvirt
Hi,
this series switches virt-2v to ocaml-libvirt, embedding the latest
version of it from git. This way, it is possible to improve the way
v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).
As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.
I could not test all
2018 Aug 30
8
[PATCH 0/7] RFC: switch v2v to ocaml-libvirt
Hi,
this is a mostly done attempt to switch to ocaml-libvirt, embedding the
latest version of it from git. This way, it is possible to improve the
way v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).
As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.
I could not
2020 Aug 05
1
[v2v PATCH] libosinfo: remove auto-cleanup for OsinfoList
...above)
- */
-#if !IS_LIBOSINFO_VERSION(1, 7, 0) || !GLIB_CHECK_VERSION(2, 63, 3)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoList, g_object_unref)
-#endif
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoOsList, g_object_unref)
#endif
@@ -157,7 +146,7 @@ v2v_osinfo_os_find_os_by_short_id (value dbv, value osv)
CAMLlocal1 (rv);
g_autoptr(OsinfoFilter) filter = NULL;
g_autoptr(OsinfoOsList) os_list = NULL;
- g_autoptr(OsinfoList) list = NULL;
+ OsinfoList *list;
OsinfoOs *os;
os_list = osinfo_db_get_os_list (OsinfoDb_t_val (dbv));
@@ -165,11 +154,14 @@ v2v_osinfo_os_find_os_by_short_id (value dbv, val...
2010 Jun 28
8
[PATCH] add xl ocaml bindings
...l(char *log_data)
+{
+ char s[1024];
+ snprintf(s, 1024, "proper logging not implemented yet: error in %s", log_data);
+ caml_raise_with_string(*caml_named_value("xl.error"), log_data);
+}
+
+static int string_string_tuple_array_val (char ***c_val, value v)
+{
+ CAMLparam1(v);
+ CAMLlocal1(a);
+ int i;
+ char **array;
+
+ for (i = 0, a = Field(v, 5); a != Val_emptylist; a = Field(a, 1)) { i++; }
+
+ array = calloc((i + 1) * 2, sizeof(char *));
+ if (!array)
+ return 1;
+ for (i = 0, a = Field(v, 5); a != Val_emptylist; a = Field(a, 1), i++) {
+ value b = Field(a, 0);
+ array[i * 2...
2017 Sep 08
2
[PATCH] RFC: v2v: add and use libvirt connection objects
...tions custom_operations = {
+ (char *) "libvirtconn_custom_operations",
+ libvirtconn_finalize,
+ custom_compare_default,
+ custom_hash_default,
+ custom_serialize_default,
+ custom_deserialize_default
+};
+
+static value
+Val_libvirtconn (virConnectPtr conn)
+{
+ CAMLparam0 ();
+ CAMLlocal1 (rv);
+
+ rv = caml_alloc_custom (&custom_operations, sizeof (virConnectPtr), 0, 1);
+ Libvirtconn_val (rv) = conn;
+
+ CAMLreturn (rv);
+}
+
+
static void
ignore_errors (void *ignore, virErrorPtr ignore2)
{
@@ -111,11 +145,10 @@ libvirt_auth_default_wrapper (virConnectCredentialPtr cred,...
2020 Sep 01
0
[nbdkit PATCH 2/2] ocaml: Implement .list_exports and friends
...= -1) {
+ caml_enter_blocking_section ();
+ CAMLreturnT (int, -1);
+ }
+
+ rv = Field (rv, 1);
+ }
+
+ caml_enter_blocking_section ();
+ CAMLreturnT (int, 0);
+}
+
+static const char *
+default_export_wrapper (int readonly, int is_tls)
+{
+ const char *name;
+ CAMLparam0 ();
+ CAMLlocal1 (rv);
+
+ caml_leave_blocking_section ();
+
+ rv = caml_callback2_exn (default_export_fn, Val_bool (readonly),
+ Val_bool (is_tls));
+ if (Is_exception_result (rv)) {
+ nbdkit_error ("%s", caml_format_exception (Extract_exception (rv)));
+ caml_enter_blo...
2020 Sep 21
0
[nbdkit PATCH v3 14/14] ocaml: Implement .list_exports and friends
...= -1) {
+ caml_enter_blocking_section ();
+ CAMLreturnT (int, -1);
+ }
+
+ rv = Field (rv, 1);
+ }
+
+ caml_enter_blocking_section ();
+ CAMLreturnT (int, 0);
+}
+
+static const char *
+default_export_wrapper (int readonly, int is_tls)
+{
+ const char *name;
+ CAMLparam0 ();
+ CAMLlocal1 (rv);
+
+ caml_leave_blocking_section ();
+
+ rv = caml_callback2_exn (default_export_fn, Val_bool (readonly),
+ Val_bool (is_tls));
+ if (Is_exception_result (rv)) {
+ nbdkit_error ("%s", caml_format_exception (Extract_exception (rv)));
+ caml_enter_blo...
2020 Feb 10
1
[nbdkit PATCH] ocaml: Support .preconnect callback
...-------------------------------------------------------*/
/* Wrapper functions that translate calls from C (ie. nbdkit) to OCaml. */
@@ -726,6 +728,25 @@ can_fast_zero_wrapper (void *h)
CAMLreturnT (int, Bool_val (rv));
}
+static int
+preconnect_wrapper (int readonly)
+{
+ CAMLparam0 ();
+ CAMLlocal1 (rv);
+
+ caml_leave_blocking_section ();
+
+ rv = caml_callback_exn (preconnect_fn, Val_bool (readonly));
+ if (Is_exception_result (rv)) {
+ nbdkit_error ("%s", caml_format_exception (Extract_exception (rv)));
+ caml_enter_blocking_section ();
+ CAMLreturnT (int, -1);
+ }
+...
2014 Jul 30
2
[PATCH 1/3] ext2: create a struct for the OCaml 't' type
...ta.fs, EXT2_FLAG_FLUSH_NO_SYNC);
#else
- ext2fs_close (fs);
+ ext2fs_close (data.fs);
#endif
}
}
@@ -104,14 +109,14 @@ static struct custom_operations ext2_custom_operations = {
};
static value
-Val_ext2fs (ext2_filsys fs)
+Val_ext2fs (struct ext2_data *data)
{
CAMLparam0 ();
CAMLlocal1 (fsv);
fsv = caml_alloc_custom (&ext2_custom_operations,
- sizeof (ext2_filsys), 0, 1);
- Ext2fs_val (fsv) = fs;
+ sizeof (struct ext2_data), 0, 1);
+ Ext2fs_val (fsv) = *data;
CAMLreturn (fsv);
}
@@ -122,18 +127,18 @@ supermin_ex...
2020 Jan 22
4
[v2v PATCH 0/3] Use libosinfo for query device drivers
This patch series integrates libosinfo in virt-v2v to get the list of
files for Windows from libosinfo, if possible. The actual data is still
from virtio-win, just unpacked.
Pino Toscano (3):
build: require libosinfo
v2v: add a minimal libosinfo interface
v2v: try to get windows driver files from libosinfo
m4/guestfs-v2v.m4 | 3 +
v2v/Makefile.am | 9 +-
2020 Jan 28
4
[v2v PATCH v2 0/3] Use libosinfo for query device drivers
This patch series integrates libosinfo in virt-v2v to get the list of
files for Windows from libosinfo, if possible. The actual data is still
from virtio-win, just unpacked.
Changes from v1:
- adapt to use the priority in libosinfo 1.7.0+
- filter out non-pre-installable drivers
- collect all the drivers matching the requirements, not just the first,
sorting them by priority like libosinfo does
2019 Aug 15
2
[nbdkit PATCH] ocaml: Add support for dynamic .thread_model
...-------------------------------*/
/* Wrapper functions that translate calls from C (ie. nbdkit) to OCaml. */
@@ -683,18 +686,30 @@ cache_wrapper (void *h, uint32_t count, uint64_t offset, uint32_t flags)
CAMLreturnT (int, 0);
}
+static int
+thread_model_wrapper (void)
+{
+ CAMLparam0 ();
+ CAMLlocal1 (rv);
+
+ caml_leave_blocking_section ();
+
+ rv = caml_callback_exn (config_complete_fn, Val_unit);
+ if (Is_exception_result (rv)) {
+ nbdkit_error ("%s", caml_format_exception (Extract_exception (rv)));
+ caml_enter_blocking_section ();
+ CAMLreturnT (int, -1);
+ }
+
+ ca...