search for: custom_operations

Displaying 20 results from an estimated 37 matches for "custom_operations".

2017 Oct 09
1
[PATCH] Fully initialize the custom_operations structs
...c | 3 ++- v2v/qemuopts-c.c | 3 ++- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/common/mlpcre/pcre-c.c b/common/mlpcre/pcre-c.c index 61af616be..da982025f 100644 --- a/common/mlpcre/pcre-c.c +++ b/common/mlpcre/pcre-c.c @@ -97,7 +97,8 @@ static struct custom_operations custom_operations = { custom_compare_default, custom_hash_default, custom_serialize_default, - custom_deserialize_default + custom_deserialize_default, + custom_compare_ext_default, }; static value diff --git a/common/mlprogress/progress-c.c b/common/mlprogress/progress-c.c index ac...
2015 Jun 25
0
[PATCH v2] v2v: Free XML objects in the correct order.
...dex 2602766..d2d895c 100644 --- a/v2v/xml-c.c +++ b/v2v/xml-c.c @@ -40,60 +40,53 @@ /* xmlDocPtr type */ #define Doc_val(v) (*((xmlDocPtr *)Data_custom_val(v))) -static void -doc_finalize (value docv) -{ - xmlDocPtr doc = Doc_val (docv); - - if (doc) - xmlFreeDoc (doc); -} - static struct custom_operations doc_custom_operations = { (char *) "doc_custom_operations", - doc_finalize, + custom_finalize_default, custom_compare_default, custom_hash_default, custom_serialize_default, custom_deserialize_default }; +value +v2v_xml_free_doc_ptr (value docv) +{ + CAMLparam1 (docv)...
2015 Jun 25
0
[PATCH] v2v: Free XML objects in the correct order.
...dex 2602766..13627e1 100644 --- a/v2v/xml-c.c +++ b/v2v/xml-c.c @@ -40,60 +40,53 @@ /* xmlDocPtr type */ #define Doc_val(v) (*((xmlDocPtr *)Data_custom_val(v))) -static void -doc_finalize (value docv) -{ - xmlDocPtr doc = Doc_val (docv); - - if (doc) - xmlFreeDoc (doc); -} - static struct custom_operations doc_custom_operations = { (char *) "doc_custom_operations", - doc_finalize, + custom_finalize_default, custom_compare_default, custom_hash_default, custom_serialize_default, custom_deserialize_default }; +value +v2v_xml_free_doc (value docv) +{ + CAMLparam1 (docv); +...
2015 Jun 25
2
[PATCH v2] v2v: Free XML objects in the correct order.
In version 2: - No substantial change, I just tidied up the code a bit. - Removed one case where whitespace changes had crept in. Rich.
2017 Feb 07
0
[PATCH v2 2/7] Move xml and xpath_helpers OCAML code to mllib
...,6 @@ -/* virt-v2v +/* Bindings for libxml2 * Copyright (C) 2009-2017 Red Hat Inc. + * Copyright (C) 2017 SUSE Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -52,7 +53,7 @@ static struct custom_operations docptr_custom_operations = { }; value -v2v_xml_free_docptr (value docv) +mllib_xml_free_docptr (value docv) { CAMLparam1 (docv); xmlDocPtr doc = docptr_val (docv); @@ -74,7 +75,7 @@ static struct custom_operations xpathctxptr_custom_operations = { }; value -v2v_xml_free_xpathctxptr (...
2017 Jul 31
0
[PATCH v11 02/10] daemon: Embed the ocaml-augeas library in the daemon.
...VE_NOOP, + /* AugNoLoad */ AUG_NO_LOAD, +}; + +/* Wrap and unwrap augeas_t handles, with a finalizer. */ +#define Augeas_t_val(rv) (*(augeas_t *)Data_custom_val(rv)) + +static void +augeas_t_finalize (value tv) +{ + augeas_t t = Augeas_t_val (tv); + if (t) aug_close (t); +} + +static struct custom_operations custom_operations = { + (char *) "augeas_t_custom_operations", + augeas_t_finalize, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default +}; + +static value Val_augeas_t (augeas_t t) +{ + CAMLparam0 (); + CAMLlocal1 (rv); + /*...
2017 Aug 09
0
[PATCH v12 02/11] common: Bundle the ocaml-augeas library for use by the daemon.
...VE_NOOP, + /* AugNoLoad */ AUG_NO_LOAD, +}; + +/* Wrap and unwrap augeas_t handles, with a finalizer. */ +#define Augeas_t_val(rv) (*(augeas_t *)Data_custom_val(rv)) + +static void +augeas_t_finalize (value tv) +{ + augeas_t t = Augeas_t_val (tv); + if (t) aug_close (t); +} + +static struct custom_operations custom_operations = { + (char *) "augeas_t_custom_operations", + augeas_t_finalize, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default +}; + +static value Val_augeas_t (augeas_t t) +{ + CAMLparam0 (); + CAMLlocal1 (rv); + /*...
2009 Aug 27
1
[PATCH 4/4] build: enable gcc warnings in capitests/ and ocaml/
...27420d5dcf7ba550751323ea2f27cf45b9146a91 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering at redhat.com> Date: Thu, 27 Aug 2009 12:36:25 +0200 Subject: [PATCH libguestfs 2/4] ocaml/guestfs_c.c: avoid warning about initialization discarding "const" * ocaml/guestfs_c.c (guestfs_custom_operations): Add a cast. --- ocaml/guestfs_c.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ocaml/guestfs_c.c b/ocaml/guestfs_c.c index 9a7454d..62d42d3 100644 --- a/ocaml/guestfs_c.c +++ b/ocaml/guestfs_c.c @@ -51,7 +51,7 @@ guestfs_finalize (value gv) } static struct custom_...
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
2017 Sep 08
2
[PATCH] RFC: v2v: add and use libvirt connection objects
...AGE_LEN 512 +/* Wrap and unwrap virConnectPtr, with a finalizer. */ +#define Libvirtconn_val(rv) (*(virConnectPtr *)Data_custom_val(rv)) + +static void +libvirtconn_finalize (value rev) +{ + virConnectPtr conn = Libvirtconn_val (rev); + if (conn) + virConnectClose (conn); +} + +static struct custom_operations 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 (); + CAMLl...
2014 Jul 30
2
[PATCH 1/3] ext2: create a struct for the OCaml 't' type
...ta = Ext2fs_val (fsv); - if (fs) { + if (data.fs) { #ifdef HAVE_EXT2FS_CLOSE2 - ext2fs_close2 (fs, EXT2_FLAG_FLUSH_NO_SYNC); + ext2fs_close2 (data.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; +...
2019 Dec 16
4
[PATCH 0/2] Move ocaml-augeas copy to libguestfs repo
ocaml-augeas is used only by virtlibguestfs, 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): Bundle the ocaml-augeas library for use by libguestfs build: switch embedded copy of ocaml-augeas .gitignore | 1 + 3rdparty/ocaml-augeas/COPYING.LIB | 515
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
2019 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
...eld (rv, 8, caml_copy_int32 (err->int2)); + + CAMLreturn (rv); +} + +static void conn_finalize (value); +static void dom_finalize (value); +static void net_finalize (value); +static void pol_finalize (value); +static void vol_finalize (value); +static void sec_finalize (value); + +static struct custom_operations conn_custom_operations = { + (char *) "conn_custom_operations", + conn_finalize, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default +}; + +static struct custom_operations dom_custom_operations = { + (char *) "dom_custom_op...
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 |
2017 Aug 01
7
[PATCH 0/2] Add lightweight bindings for PCRE.
We'd like to use PCRE instead of the awful Str module. However I don't necessarily want to pull in the extra dependency of ocaml-pcre, and in any case ocaml-pcre is rather difficult to use. This introduces very simplified and lightweight bindings for PCRE. They work rather like Str in that there is some global state (actually thread-local in this implementation) between the matching and
2017 Feb 07
11
[PATCH v2 0/7] Introducing virt-builder-repository
Hi all, Here is a new version of the virt-builder-repository series taking care of Pino's comments. It has also been rebased on recent master. Cédric Bosdonnat (7): mllib: factorize code to add Checksum.get_checksum function Move xml and xpath_helpers OCAML code to mllib mllib: expose libosinfo DB reading functions in mllib builder: rename docs test script builder: add
2017 Feb 10
15
[PATCH v3 00/10] Introducing virt-builder-repository
Hi guys, Here is a v3 of the series, including changes to answer Richard's comments. Cédric Bosdonnat (10): mllib: factorize code to add Checksum.get_checksum function Move xml and xpath_helpers OCAML code to mllib mllib: add Xml.parse_file helper lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo
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