Displaying 20 results from an estimated 600 matches similar to: "[PATCH] v2v: Free XML objects in the correct order."
2015 Jun 25
0
[PATCH v2] v2v: Free XML objects in the correct order.
If you free an xmlDocPtr before any xmlXPathObjectPtrs that reference
the doc, you'll get valgrind errors like this:
==7390== Invalid read of size 4
==7390== at 0x4EB8BC6: xmlXPathFreeNodeSet (xpath.c:4185)
==7390== by 0x4EB8CC5: xmlXPathFreeObject (xpath.c:5492)
==7390== by 0x400A56: main (in /tmp/test)
==7390== Address 0x60c0928 is 8 bytes inside a block of size 120
2017 Feb 07
0
[PATCH v2 2/7] Move xml and xpath_helpers OCAML code to mllib
To allow other pieces of code to process XML files easily, move the
xml.ml* and xpath_helpers.ml* from v2v to mllib.
---
docs/C_SOURCE_FILES | 2 +-
mllib/Makefile.am | 9 ++++++--
{v2v => mllib}/xml-c.c | 47 +++++++++++++++++++-------------------
{v2v => mllib}/xml.ml | 49 ++++++++++++++++++++++------------------
{v2v =>
2014 Aug 26
3
Segmentation fault when trying to add binding
Hi,
I am trying to add xmlXPathRegisterNs() to v2v/xml-c.c but I get a seg fault,
the signature should be:
http://xmlsoft.org/html/libxml-xpathInternals.html#xmlXPathRegisterNs
I think I am wrong in CAMLparam and CAMLlocal...,
Following is the patch:
===================================================================================
diff --git a/v2v/xml-c.c b/v2v/xml-c.c
index 4c9bc77..a917c24
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 Oct 27
0
[PATCH v11 7/8] mllib: add XPath helper xpath_get_nodes
This function will allow more OCaml-ish processing of XPath queries
with multiple results.
---
common/mltools/xpath_helpers.ml | 9 +++++++
common/mltools/xpath_helpers.mli | 4 +++
v2v/output_libvirt.ml | 11 ++------
v2v/test-harness/v2v_test_harness.ml | 51 +++++++++++-------------------------
4 files changed, 30 insertions(+), 45 deletions(-)
diff --git
2017 Mar 13
0
[PATCH 2/2] v2v: -i ova: Factor out the OVF parsing into a separate module.
Mixing the XML parsing with the other functions of this module made it
very hard to understand. Splitting the XML parsing into another
module simplifies the flow considerably.
This is just code refactoring and should not affect the semantics.
---
v2v/Makefile.am | 2 +
v2v/input_ova.ml | 323 +++++++++++----------------------------------
v2v/parse_ovf_from_ova.ml | 226
2017 Apr 04
1
Re: [PATCH v5 09/10] mllib: add XPath helper xpath_get_nodes()
On Thursday, 23 March 2017 10:02:47 CEST Cédric Bosdonnat wrote:
> This function will allow more OCAML-ish processing of xpath queries
> with multiple results.
s/OCAML/OCaml/
s/xpath/XPath/
> ---
> mllib/xpath_helpers.ml | 9 +++++++++
> mllib/xpath_helpers.mli | 4 ++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/mllib/xpath_helpers.ml
2014 Oct 31
0
[PATCH] v2v: -o libvirt: Get the <features/> right in the output XML (RHBZ#1159258).
Implement what old virt-v2v did (from
lib/Sys/VirtConvert/Connection/LibVirtTarget.pm)
Thanks: Tingting Zheng, Matthew Booth
---
v2v/output_libvirt.ml | 118 ++++++++++++++++++++++++++++++++++++++++++++++---
v2v/output_libvirt.mli | 2 +-
v2v/output_local.ml | 13 +++++-
v2v/test-v2v-i-ova.xml | 5 ++-
4 files changed, 128 insertions(+), 10 deletions(-)
diff --git
2017 Oct 08
1
Re: [PATCH v11 5/6] mllib: add XPath helper xpath_get_nodes()
The subject says ‘xpath_get_nodes()‘, but this function doesn't
actually take a unit parameter, so it's better to drop ‘()’.
On Thu, Oct 05, 2017 at 04:58:29PM +0200, Cédric Bosdonnat wrote:
> +
> +let xpath_get_nodes xpathctx expr =
> + let obj = Xml.xpath_eval_expression xpathctx expr in
> + let nodes = ref [] in
> + for i = 0 to Xml.xpathobj_nr_nodes obj - 1 do
> +
2017 Mar 16
0
[PATCH 1/4] p2v: Pass host CPU details to virt-v2v.
In the fake <domain type='physical'> libvirt XML that we create to
describe the physical host, we did not accurately pass any information
about the host CPU except the number of cores (<vcpu/>).
This commit extracts detailed information about the vendor, model and
topology of the host CPU and adds that to the libvirt XML for
virt-v2v. Conveniently we can use libvirt
2017 Mar 07
0
[PATCH v4 2/9] lib: extract osinfo DB traversing API
Split lib/osinfo.c to provide an API for other pieces of code (namely
mllib) to reuse it. The ISO-related processing is thus moved into a
lib/osinfo-iso.c file.
---
lib/Makefile.am | 2 +
lib/osinfo-iso.c | 462 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/osinfo.c | 422 +-------------------------------------------------
lib/osinfo.h | 27 ++++
4 files changed, 493
2017 Mar 23
2
[PATCH] p2v: Use lscpu instead of libvirt to get CPU information.
Don't get the CPU information from libvirt, because including libvirt
and all dependencies in the virt-p2v ISO bloats everything.
Instead get most of the information we need from the util-linux
program 'lscpu'.
Unfortunately the CPU model cannot be retrieved.
Example output:
$ ./run virt-p2v --cmdline="p2v.dump_config_and_exit"
[...]
cpu vendor . . . Intel
cpu
2017 Feb 10
0
[PATCH v3 05/10] lib: extract osinfo DB traversing API
Split lib/osinfo.c to provide an API for other pieces of code (namely
mllib) to reuse it. The ISO-related processing is thus moved into a
lib/osinfo-iso.c file.
---
lib/Makefile.am | 2 +
lib/osinfo-iso.c | 464 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/osinfo.c | 424 +-------------------------------------------------
lib/osinfo.h | 27 ++++
4 files changed, 495
2017 Jun 19
0
[PATCH v7 2/9] lib: extract osinfo DB traversing API
Split lib/osinfo.c to provide an API for other pieces of code (namely
mllib) to reuse it. The ISO-related processing is thus moved into a
lib/osinfo-iso.c file.
---
lib/Makefile.am | 2 +
lib/osinfo-iso.c | 462 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/osinfo.c | 420 +-------------------------------------------------
lib/osinfo.h | 27 ++++
4 files changed, 493
2017 Apr 12
0
[PATCH v6 02/10] lib: extract osinfo DB traversing API
Split lib/osinfo.c to provide an API for other pieces of code (namely
mllib) to reuse it. The ISO-related processing is thus moved into a
lib/osinfo-iso.c file.
---
lib/Makefile.am | 2 +
lib/osinfo-iso.c | 462 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/osinfo.c | 420 +-------------------------------------------------
lib/osinfo.h | 27 ++++
4 files changed, 493
2014 Nov 24
0
Re: [PATCH] v2v: -i ova: Remove incorrect warning for disks that have no parent controller (RHBZ#1167302).
On Monday 24 November 2014 16:01:36 Richard W.M. Jones wrote:
> Don't assume every disk <Item> has a <Parent> field. For floppy disks
> this is not the case.
>
> Thanks: Junqin Zhou
> ---
> v2v/input_ova.ml | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml
> index
2014 Nov 24
3
[PATCH] v2v: -i ova: Remove incorrect warning for disks that have no parent controller (RHBZ#1167302).
Don't assume every disk <Item> has a <Parent> field. For floppy disks
this is not the case.
Thanks: Junqin Zhou
---
v2v/input_ova.ml | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml
index 95af2e5..9a9c10a 100644
--- a/v2v/input_ova.ml
+++ b/v2v/input_ova.ml
@@ -187,14 +187,17 @@ object
for i = 0 to
2017 Feb 07
0
[PATCH v2 3/7] mllib: expose libosinfo DB reading functions in mllib
src/osinfo.c has generic code to read the libosinfo DB. Add a wrapper
around it to expose it in mllib for use in ocaml code.
---
lib/Makefile.am | 2 +
lib/osinfo-iso.c | 464 ++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/osinfo.c | 477 ++++++------------------------------------------------
lib/osinfo.h | 27 ++++
mllib/Makefile.am | 11 +-
mllib/osinfo-c.c | 100
2017 Oct 08
0
[PATCH v2 4/4] common/mltools: xpath_helpers: Get rid of xpath_*_default functions.
Instead of using ‘xpath_(string|int|int64)_default’ we can write the
equivalent code using ‘Option.default’. This is not quite so concise,
but may be easier to understand.
eg:
xpath_int_default xctx "xpath_expr" 10
->
Option.default 10 (xpath_int xctx "xpath_expr")
---
common/mltools/xpath_helpers.ml | 12 ------------
common/mltools/xpath_helpers.mli | 6 ------
2015 Oct 08
0
[PATCH] v2v: Add xpath_int64 functions, and use them to read memory values.
On 32 bit platforms, reading the memory values can cause some numbers
to be read as negative numbers. Fix this by treating memory values as
64 bit integers throughout the parsing and calculation.
---
v2v/input_libvirtxml.ml | 7 ++++---
v2v/input_ova.ml | 7 ++++---
v2v/utils.ml | 15 +++++++++++++++
3 files changed, 23 insertions(+), 6 deletions(-)
diff --git