Avoid extra module variables, and just use Optgroups directly.
---
daemon/ldm.ml| 2 --
daemon/ldm.mli | 2 --
daemon/listfs.ml | 4 ++--
daemon/lvm.ml| 2 --
daemon/lvm.mli | 2 --
5 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/daemon/ldm.ml b/daemon/ldm.ml
index c177
This way the Lvm module contains only the OCaml implementations of LVM
daemon APIs.
This is simple refactoring, with no functional changes.
---
daemon/Makefile.am | 2 ++
daemon/findfs.ml| 2 +-
daemon/inspect_fs_unix_fstab.ml | 2 +-
daemon/lvm.ml
Hi,
this is the v3 of my series for nbdkit_realpath; this series adds an
extra documentation update to nbdkit_absolute_path, documenting when it
can only be used, and then adds nbdkit_realpath.
Thanks,
Pino Toscano (2):
docs: improve documentation of nbdkit_absolute_path
plugin: add and use
Hi,
this small patch series exposes one of the utility in f2fs-tools, and
use it to expand f2fs partitions in virt-resize.
Thanks,
Pino Toscano (2):
New API: f2fs_expand
resize: expand f2fs partitions
daemon/Makefile.am| 1 +
daemon/f2fs.c | 49
Expose the resize.f2fs utility from f2fs-tools, to expand a f2fs
filesystem.
---
daemon/Makefile.am| 1 +
daemon/f2fs.c | 49 +++
generator/actions_core.ml | 9 +
generator/proc_nr.ml | 1 +
lib/MAX_PROC_NR |
When updating the device names to the new names, handle GRUB_CMDLINE
entries (typically in grub2 configuration files) correctly: loop over
the whole configuration value, and replace each occurrency of
resume=/dev/device found.
The actual code is moved away from replace_if_device, since this
functi
Mention what it really does, and where it can only be used.
Signed-off-by: Pino Toscano
---
docs/nbdkit-plugin.pod | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/docs/nbdkit-plugin.pod b/docs/nbdkit-plugin.pod
index 65f3190..27a885e 100644
--- a/docs/nbdkit-plugin.pod
.
Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1527334
Signed-off-by: Pino Toscano
---
docs/nbdkit-plugin.pod | 17 +
include/nbdkit-common.h | 1 +
plugins/example2/example2.c | 2 +-
plugins/file/file.c | 6 +-
plugins/gzip/gzip.c | 2
Use resize.f2fs (via f2fs_expand) to expand f2fs filesystems, if
available.
---
resize/resize.ml | 12 ++--
resize/virt-resize.pod | 10 --
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 1a21e4dff..8e4bb1b16 100644
--
Use resize.f2fs (via f2fs_expand) to expand f2fs filesystems, if
available.
---
resize/resize.ml | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 1a21e4dff..8e4bb1b16 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@
y fail later on with a strange error message.
>
> Test the root filesystem is writable by creating and deleting a
> temporary file, and if the creation fails then give better
> diagnostics.
Another possibility here could be to use the "norecover" mount option.
--
Pino Toscan
Instead of storing the number of sockets, cores, and threads separately
with the possibility to have each of them optional, store them together,
so either we have a CPU topology or none. This slightly simplifies the
handling of CPU topology.
Most of the output modes/producers already considered a
Commit 889386f8c6088e57fd68f2bb6bf85f69ecfc6f6c removed most of them
already, so remove the last ones, and the supporting code.
---
generator/UEFI.ml | 6 --
v2v/utils.ml | 1 -
2 files changed, 7 deletions(-)
diff --git a/generator/UEFI.ml b/generator/UEFI.ml
index 5161e28ee..1ff3f84d2
free_last_match() frees the memory of the match passed as argument, so
accessing it is not possible after free_last_match(). Since all we
need is the return code, save it locally for later usage.
---
common/mlpcre/pcre-c.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/comm
Call realloc() directly with the pointer to the old data, instead of
assigning it to the destination variable, and using that one. The rest
of the code is the same, already properly checking for the results of
realloc(), so this mostly help static code analyzers.
---
common/qemuopts/qemuopts.c |
When creating an helper string for do_aug_match(), use a simpler
asprintf() with manual free(), since the code block is small enough.
This slightly helps static code analyzers.
---
daemon/augeas.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/daemon/augeas.c b/dae
Make sure to not leak the file descriptor in the upload() function, in
case lseek() fails.
---
daemon/upload.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/daemon/upload.c b/daemon/upload.c
index 9de855f86..540a86437 100644
--- a/daemon/upload.c
+++ b/daemon/upload.c
@@ -111,6 +111,7 @@ upl
When the result guestfs_disk_format() is not known, free the string
before returning an error.
---
lib/launch-libvirt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c
index e4961f201..844023b80 100644
--- a/lib/launch-libvirt.c
+++ b/lib/launch-libv
Use the cleanup handlers to free the structs (and list of structs) in
case their OCaml->C transformation fails for any reason; use calloc()
to not try to use uninitialized memory.
In case of lists, avoid allocating the memory for the array if there
are no elements, since the returned pointer in th
Since it does not make much sense, then forbid this situation outright:
- change qemuopts_end_arg_list() to return an error if the current arg
list has no elements
- when creating the argv array, assert that each arg list is not empty
---
common/qemuopts/qemuopts.c | 14 --
1 file ch
Some compilers do not manage to figure out that the members of it are
set only when search_appliance() in the end returns 1, which is already
checked. Help them a bit by resetting the appliance_files struct on our
own, so they will not report that 'appliance.kernel', and the others are
used as uni
Starting OpenJDK 10, the 'javah' utility is no more provided [1], and
its functionality is provided by 'javac' itself. Hence, do not error
out on missing 'javah', and store whether it was found; in case it is
not, then:
1) assume 'javac' has the -h parameter to generate the C header, and
make u
Newer versions of file slightly changed the output, removing the comma
between the type, and the architecture string.
Tweak the regular expression so:
- the comma is optional, but if missing then only the architecture
string will follow
- the architecture string has no commas
---
daemon/filearc
+[#ifdef HAVE_RPC_TYPES_H
> +# include
> +#endif
> +])
Considering we assume that rpc/types.h exists, there is no need to
check it at configure time -- just include it directly in the
AC_CHECK_HEADER for rpc/xdr.h.
Also, this needs to be in its own patch (with authorship, description,
etc).
--
Pin
When using non-JSON disk notation, the disk will be the snapshot #2.
Fixes commit e5946165c8ea78e0e91c4cfdb5e793526cd638e1.
---
v2v/test-v2v-i-ova-snapshots.expected | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/v2v/test-v2v-i-ova-snapshots.expected
b/v2v/test-v2v-i-ova-sna
I only tested this on Linux but at least it doesn't break things
> there.
LGTM.
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
my $g = Sys::Guestfs->new ();
> +$g->set_memsize ($g->get_memsize () * 20 / 5);
> $g->launch ();
> my %kernel = $g->utsname;
> $g->close ();
I don't see how this changes the situation, given that the handle
here is used only to get the information of the k
If the RHV Setup Tools ISO is installed, open it, and copy RHEV APT from
there, instead of using (if available) the executable located in the
virt-tools data directory.
This way, RHV conversion hosts with the RHV Setup Tools ISO installed
will always install the latest version when convering Windo
The current detection code for Linux kernels assumes that a kernel
package contains everything in it, i.e. the kernel itself, its modules,
and its configuration. However, since recent Ubuntu versions (e.g.
starting from 18.04) modules & config (with few more files) are split in
an own package, thu
Commit 4699c7b6e126e07c95b67fb95df58aed87a680dd converted the null
output to use the null-co qemu driver with a JSON URL syntax --
especially the latter is only available in newer versions of qemu.
Even if this output mode is mostly for testing, check at runtime whether
the null-co + JSON way is p
On Tuesday, 22 May 2018 09:11:17 CEST Richard W.M. Jones wrote:
> This also allows us to use virt-v2v with the old version of qemu in
> RHEL 7.
>
> Fixes commit e29296cfa20dd691995832940a30fe2e6b98149a.
>
> Thanks: Pino Toscano for suggesting the fix.
> ---
LGTM (indeed
The current detection code for Linux kernels assumes that a kernel
package contains everything in it, i.e. the kernel itself, its modules,
and its configuration. However, since recent Ubuntu versions (e.g.
starting from 18.04) modules & config (with few more files) are split in
an own package, thu
Use the $(srcdir) variable where needed, to make sure it builds also
with srcdir != builddir.
Furthermore, make sure that the OCaml dependencies calculation depend on
the generated output_rhv_upload_*_source.ml files, otherwise there will
be incomplete OCaml rules for them in the generated .depend
he default
change only if strictly needed to work in "usual workloads".
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
ay/msg00082.html
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
On Wednesday, 23 May 2018 15:42:42 CEST Tomáš Golembiovský wrote:
> On Fri, 18 May 2018 17:42:15 +0200
> Pino Toscano wrote:
>
> > If the RHV Setup Tools ISO is installed, open it, and copy RHEV APT from
> > there, instead of using (if available) the executable located in th
ix:
> + lvm_system_dir = getenv ("LVM_SYSTEM_DIR");
> + if (!lvm_system_dir)
> +lvm_system_dir = "/etc/lvm";
> + fprintf (stderr, "lvm_system_dir = %s\n", lvm_system_dir);
The pointer returned by getenv() can change, so it will be better to
you fetch it once
- you want to test conversions offline (assuming the output is a local
disk, or libvirt)
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://ww
about making them a bit more loose, e.g.:
input:((?:[^\\n])+)
so there are no further changes to do, in case other non-word
characters are used in the names of input, and output modes?
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
On Tuesday, 12 June 2018 18:16:11 CEST Richard W.M. Jones wrote:
> On Tue, Jun 12, 2018 at 12:13:32PM +0200, Pino Toscano wrote:
> > On Tuesday, 12 June 2018 11:27:56 CEST Richard W.M. Jones wrote:
> > > The new ‘-o rhv-upload’ output mode contains a '-' characte
The 'localmountpoint' variable in the handle is available only when
building with FUSE support, so guard it in a proper #ifdef block.
Fixes commit 296370fb86e96eec095d86faf6de8f532395ea54.
---
lib/handle.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/handle.c b/lib/handle.c
index bc4
n an
user specifies a relative path that cannot be resolved during
add_drive, but does chdir before run.
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.r
On Thursday, 21 June 2018 12:01:50 CEST Richard W.M. Jones wrote:
> ---
> lib/launch-libvirt.c | 15 ++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
LGTM.
Thanks,
--
Pino Toscano
signature.asc
Description: This is a digitally signed mes
On Friday, 15 June 2018 17:18:57 CEST Richard W.M. Jones wrote:
> Avoids the libvirt error:
>
> error: XML error: CPU vendor specified without CPU model
> ---
LGTM.
Thanks,
--
Pino Toscano
signature.asc
Description: This is a digitally signed
er parameter already ...
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
On Monday, 18 June 2018 11:41:32 CEST Richard W.M. Jones wrote:
> Required ever since this change was made to oVirt:
> https://gerrit.ovirt.org/#/c/91902/
>
> Thanks: Arik Hadas
> ---
It looks compatible with oVirt before the aforementioned patch, so
LGTM.
Thanks,
-
On Monday, 18 June 2018 16:59:49 CEST Richard W.M. Jones wrote:
> Note that this attribute is optional.
>
> Thanks: Arik Hadas
> ---
LGTM.
Thanks,
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
__
It ended
> up mapping this to just "rhv" meaning two "rhv" entries would appear
> in the list of output drivers.
>
> Thanks: Ming Xie.
> ---
LGTM.
Thanks,
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
__
Add the podcheck.pl test, to make sure the documentation is in sync with
the available options.
Also fix the formats of options in the current POD, so it matches what
used already in other documentations, and what podcheck.pl expects.
---
test-tool/Makefile.am | 12 +
While not useful per-se, it will help checking the available options.
---
test-tool/Makefile.am | 5 -
test-tool/test-tool.c | 9 -
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/test-tool/Makefile.am b/test-tool/Makefile.am
index bf4f5a843..2cbd4d1b1 100644
--- a/test
Use the simple virt-v2v-copy-to-local script for it.
---
.gitignore | 1 +
bash/Makefile.am| 3 ++-
bash/virt-v2v-copy-to-local | 6 ++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 871795bcc..a78fd1633 100644
--- a/.gi
*** BLURB HERE ***
Pino Toscano (3):
test-tool: implement --short-options & --long-options
test-tool: add a documentation test
bash: add a completion script for libguestfs-test-tool
.gitignore | 1 +
bash/Makefile.am
In verbose mode, print the generated libvirt XML to stderr for
debugging, just like -o libvirt does.
---
v2v/output_local.ml | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/v2v/output_local.ml b/v2v/output_local.ml
index 4e1088afc..c70428134 100644
--- a/v2v/output_local
Thanks to: Ming Xie
---
v2v/virt-v2v.pod | 3 +++
1 file changed, 3 insertions(+)
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
index ff25f98d4..a533e95da 100644
--- a/v2v/virt-v2v.pod
+++ b/v2v/virt-v2v.pod
@@ -766,6 +766,9 @@ For I<-o libvirt>, this is a libvirt directory pool
For I<-o loca
Due to a conflict with the IDs of the OVF standard, and the existing
implementation in ovirt-engine, the ID of QXL devices changed to a
different value.
As a consequence, change the ResourceType of QXL devices, but only in
OVirt flavour to avoid breaking vdsm mode.
See: https://bugzilla.redhat.co
The change is not correct in case the OVF is used in -o vdsm mode, for
example. Let's revert it, and then implement it properly.
This reverts commit 296b2f66c71df0bf5ee2ee605fe4b92672796ab3.
---
v2v/create_ovf.ml| 2 +-
v2v/test-v2v-o-rhv.ovf.expected | 2 +-
v2v
Add new paths for the Secure Boot variant of OVMF as found in Fedora.
---
generator/UEFI.ml | 6 ++
1 file changed, 6 insertions(+)
diff --git a/generator/UEFI.ml b/generator/UEFI.ml
index 1ff3f84d2..bca3fa1ae 100644
--- a/generator/UEFI.ml
+++ b/generator/UEFI.ml
@@ -52,6 +52,12 @@ let firmw
Check earlier whether the ovirtsdk4 Python can be imported correctly,
to avoid errors later on during the migration.
---
v2v/output_rhv_upload.ml | 8
1 file changed, 8 insertions(+)
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
index 0152b8d5a..63fa2411a 100644
--- a/
sers should migrate to lvm_scan, they can just add a new optarg.
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
o convoluted -- what about something like
(untested):
let get_ovirt_biostype guestcaps = function
| TargetBIOS -> 0 (* i440fx + SeaBIOS *)
| TargetUEFI ->
let caps = find_uefi_firmware guestcaps.gcaps_arch in
if List.mem Uefi.UEFI_FLAG_SECURE_BOOT_REQUIRED caps.flags
th
it 19b0ae6c6502c4833c73e1b1bfa47b43a40f21e9, so its behaviour
will be as the patch does
2) add the new APIs in a second commit
This way the fix for vgscan could be backported to 1.38.x, if it is
safe enough, leaving the new API for 1.39+.
Also, just (1) should be enough to fix rhbz#16
If the /etc/fstab of a guest contains devices specified with UUID or
LABEL, then the new OCaml inspection code will report the findfs failure
as general failure of the inspection. OTOH, the old C inspection code
simply ignored all the devices that cannot be resolved.
Hence, restore the old behavi
- wrap a too long line
- join strings in multiple lines using + (plus) instead of \ (backslash)
---
v2v/rhv-upload-plugin.py | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
index 4fad27fb8..bdc1e104a 100644
--- a/v2v/rh
Allocate 'ret' as late as possible, so there is no risk that early
returns will leak it.
---
daemon/btrfs.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 26757d4fb..5c4be6cf7 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@
odules ());
> List.iter (printf "convert:%s\n") (Modules_list.convert_modules ());
Make sense, I will push it soon.
Thanks,
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
This device naming is mostly written by virt-p2v, so get the slot from
it directly without using the drive_index "decoding" function.
---
v2v/parse_libvirt_xml.ml | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml
index
When erroring out about duplicated parameters, say "more than once"
instead of "twice", since there can be more than two repeated
parameters.
Thanks to: Xiaodai Wang
---
generator/fish.ml | 2 +-
generator/perl.ml | 2 +-
resize/resize.ml | 4 ++--
tools/virt-tar
On Friday, 10 August 2018 14:51:12 CEST Richard W.M. Jones wrote:
> On Thu, Aug 09, 2018 at 03:05:26PM +0200, Pino Toscano wrote:
> > This device naming is mostly written by virt-p2v, so get the slot from
> > it directly without using the drive_index "decoding" f
-i disk, -i ova, and -i vmx.
IMHO the issue is in the libvirt XML parser, which starts to number the
disks from 1. I'm sending a patch for this.
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
When parsing the libvirt XML, make sure to assign the IDs for disks
(s_disk_id) from 0 instead of 1, just like all the other input modes not
based on libvirt XML.
---
v2v/parse_libvirt_xml.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_l
On Tuesday, 14 August 2018 16:53:02 CEST Richard W.M. Jones wrote:
> On Tue, Aug 14, 2018 at 04:04:10PM +0200, Pino Toscano wrote:
> > When parsing the libvirt XML, make sure to assign the IDs for disks
> > (s_disk_id) from 0 instead of 1, just like all the other input modes n
On Tuesday, 14 August 2018 17:44:30 CEST Richard W.M. Jones wrote:
> On Tue, Aug 14, 2018 at 05:32:08PM +0200, Pino Toscano wrote:
> > On Tuesday, 14 August 2018 16:53:02 CEST Richard W.M. Jones wrote:
> > > On Tue, Aug 14, 2018 at 04:04:10PM +0200, Pino Toscano wrote:
> &
When parsing the libvirt XML, make sure to assign the IDs for disks
(s_disk_id) from 0 instead of 1. This does not change the actual
behaviour, just makes the IDs like in all the other input modes not
based on libvirt XML.
---
v2v/parse_libvirt_xml.ml | 2 +-
1 file changed, 1 insertion(+), 1 del
messages in the QMP communication, which we do
not do. We parse JSON from:
- output of ldmtool
- output of qemu-img
- QMP schema
- SimpleStream files
Furthermore, why not just fix qemu, instead of letting its
"JSON implementation" rule out perfectly compliant JSON parsers?
--
Pino To
> +| JSON_parser_bool of bool
I'd drop the _parser_ from the name, as seems redundant (and makes
both type name, and all its values long enough...).
The rest of it LGTM.
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
_
error_unexpected_output (s_"expecting \"required\" to be an
> integer")
> + json
> + )
> + | _ ->
> + error_unexpected_output (s_"expecting object at top level") json
You can replace this whole using
Hi,
patches #2, and #3 LGTM; I left notes for patches #1, and #4.
Thanks,
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo
Store the machine-readable flag globally, just like done for
verbose/debug/etc, and enhance create_standard_options to provide
--machine-readable automatically.
---
common/mlstdutils/std_utils.ml | 4
common/mlstdutils/std_utils.mli | 7 +--
common/mltools/tools_utils.ml | 7 ++-
c
Make use of the helper provided by Tools_utils.create_standard_options,
so there is no need to implement the logic in each tool.
This affects all the OCaml tools with --machine-readable, namely:
virt-builder, virt-builder-repository, virt-dib, virt-get-kernel,
virt-resize, virt-sparsify, and virt-
Introduce a new type of option with an optional string argument.
---
common/mltools/getopt-c.c | 20 +++-
common/mltools/getopt.ml | 5 -
common/mltools/getopt.mli | 4
common/mltools/getopt_tests.ml | 18 +-
common/mltools/test-getopt.sh
Introduce a new type of option with an optional string argument.
---
common/mltools/getopt-c.c | 20 +++-
common/mltools/getopt.ml | 5 -
common/mltools/getopt.mli | 4
common/mltools/getopt_tests.ml | 18 +-
common/mltools/test-getopt.sh
osed --print-estimate for virt-v2v [1] could print
human output (just like the --print-source), while printing e.g. JSON to
the machine-readable stream.
[1] https://www.redhat.com/archives/libguestfs/2018-August/msg00158.html
Thanks,
Pino Toscano (2):
common/mltools: getopt: add Getopt.OptString
O
Add an optional argument for --machine-readable to select the output,
adding a new function to specifically write data to that output stream.
The possible choices are:
* --machine-readable: to stdout, like before
* --machine-readable=file:name-of-file: to the specified file
* --machine-readable=str
ble AC_USE_SYSTEM_EXTENSIONS.
> (AC_GNU_SOURCE was removed back in 2011).
> ---
LGTM.
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
uestfs.la \
> + $(top_builddir)/gnulib/lib/libgnu.la
Hmm what's the exact error in this case? On which platform?
The java binding does not explicitly use the hash stuff from gnulib.
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
On Monday, 20 August 2018 18:02:02 CEST Richard W.M. Jones wrote:
> An evolution of:
>
> https://www.redhat.com/archives/libguestfs/2018-August/msg00155.html
Patches #1, #2, and #3 LGTM.
Thanks,
--
Pino Toscano
signature.asc
Description: This is a digitally signed mes
thus JSON.json_t must represent it as well.
This is even used in other parts, for example the check of backing
files of disks (see guestfs_impl_disk_has_backing_file).
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
On Wednesday, 22 August 2018 12:29:41 CEST Richard W.M. Jones wrote:
> On Tue, Aug 21, 2018 at 05:44:30PM +0200, Pino Toscano wrote:
> > +let machine_readable_printf fs =
> > + let get_machine_readable_channel () =
> > +let open_machine_readable_channel
When creating the qemu-img command, use the guestfs_int_cmd_add_arg &
guestfs_int_cmd_add_arg_format APIs to add the proper filename directly,
without creating a string for it.
This should cause no functional change.
---
lib/create.c | 25 +++--
1 file changed, 11 insertions(+
On Wednesday, 22 August 2018 16:41:01 CEST Richard W.M. Jones wrote:
> v2:
> - Added back the null value.
> - Reran the tests.
LGTM.
Thanks,
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestf
On Wednesday, 22 August 2018 16:16:40 CEST Richard W.M. Jones wrote:
> On Wed, Aug 22, 2018 at 12:56:47PM +0200, Pino Toscano wrote:
> > On Tuesday, 14 August 2018 15:42:13 CEST Richard W.M. Jones wrote:
> > > ---
> > > java/Makefile.am | 3 ++-
> > > 1 file
Tools_utils
- expose all in a single machine_readable () function
- add a test
- add the documentation bits
Thanks,
Pino Toscano (2):
common/mltools: getopt: add Getopt.OptString
OCaml tools: add output selection for --machine-readable
.gitignore | 1 +
builder
Add an optional argument for --machine-readable to select the output,
adding a new function to specifically write data to that output stream.
The possible choices are:
* --machine-readable: to stdout, like before
* --machine-readable=file:name-of-file: to the specified file
* --machine-readable=str
Introduce a new type of option with an optional string argument.
---
common/mltools/getopt-c.c | 20 +++-
common/mltools/getopt.ml | 26 ++
common/mltools/getopt.mli | 4
common/mltools/getopt_tests.ml | 18 +-
common/ml
alled
Of course the example above is overly simplified -- though,
can the above happen?
Thanks,
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.co
On Thursday, 23 August 2018 17:44:21 CEST Sebastian Meyer wrote:
> Hi Pino,
>
> On 23.08.2018 17:21, Pino Toscano wrote:
> > No problem with the patch, just one question: can it happen that zypper
> > may decide to install packages when removing others, e.g. to keep some
ter the number of disks, for coherency.
> + let json = Filename.temp_file "v2vmeasure" ".json" in
> + unlink_on_exit json;
> +
> + let fd = Unix.openfile json [O_WRONLY; O_CREAT; O_TRUNC] 0o600 in
IMHO these can be replaced by Filename.open_temp_file +
Unix.descr_o
No need to read the whole file manually.
---
builder/simplestreams_parser.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/simplestreams_parser.ml b/builder/simplestreams_parser.ml
index ccbfdff67..407eb11fb 100644
--- a/builder/simplestreams_parser.ml
+++ b/builder/s
Easy way to parse JSON from a file, without reading it all to string
first.
---
common/mltools/JSON_parser-c.c | 25 +
common/mltools/JSON_parser.ml | 1 +
common/mltools/JSON_parser.mli | 3 +++
common/mltools/JSON_parser_tests.ml | 23 +++
n;
> + let json = json_parser_tree_parse json in
I just pushed json_parser_tree_parse_file, so that can be used instead
using read_whole_file.
> +echo -n "Estimate: "
> +cat $f
> +
> +# Check the output looks reasonable.
> +grep -E 'total.*[[:digit:]]+' $f
M
901 - 1000 of 3085 matches
Mail list logo