Displaying 20 results from an estimated 400 matches similar to: "[PATCH 1/3] ocaml: dynamically generate the content of Guestfs.Errno"
2014 Mar 17
4
[PATCH 1/4] ocaml: Add Guestfs.Errno submodule exposing useful raw errno numbers.
For use when calling G.last_errno.
---
generator/ocaml.ml | 15 +++++++++++++++
ocaml/guestfs-c.c | 8 ++++++++
2 files changed, 23 insertions(+)
diff --git a/generator/ocaml.ml b/generator/ocaml.ml
index 78cff89..29a9eb6 100644
--- a/generator/ocaml.ml
+++ b/generator/ocaml.ml
@@ -121,10 +121,20 @@ val last_errno : t -> int
(or [0] if there was no errno). Note that the returned
2015 Jun 18
3
[PATCH v2 0/3] daemon: parted: Always use -s option even with -m.
version 2:
- Turn the "unrecognised disk label" error into errno == EINVAL
- Fix virt-alignment-scan
- Rework the fix for virt-v2v bug 1232192 (see description of patch 3/3)
2019 Apr 01
2
[PATCH] OCaml tools: fix 3999 -> 3339 typo
RFC 3339 is the actual RFC for date/time strings.
Typo found by Martin 'eagle eyes' Kletzander.
Fixes commit f79129b8dc92470e3a5597daf53c84038bd6859e.
---
common/mltools/tools_utils-c.c | 4 ++--
common/mltools/tools_utils.ml | 4 ++--
lib/guestfs.pod | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/common/mltools/tools_utils-c.c
2016 Sep 19
0
[PATCH 2/3] mllib: expose disk decrypt functionalities
Expose via Common_utils the C functions & variables (part of guestfish)
that handle decryption of LUKS partitions, and the additional command
line arguments to tune the way they work. This way it will be easy to
provide (basic) crypto support also in OCaml-based tools.
Related to: RHBZ#1362649
---
mllib/Makefile.am | 3 ++
mllib/common_utils-c.c | 75
2019 Mar 22
0
[PATCH 3/4] common/mltools: allow fd for machine readable output
Allow to specify a file descriptor for the machine readable output.
Sadly, the OCaml C glue for the channels is not public API, so enable
the internals for this...
---
common/mltools/tools_utils-c.c | 17 +++++++++++++++++
common/mltools/tools_utils.ml | 10 +++++++++-
lib/guestfs.pod | 5 +++++
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git
2019 Mar 22
0
[PATCH 4/4] OCaml tools: output messages into JSON for machine readable
When the machine readable mode is enabled, print all the messages
(progress, info, warning, and errors) also as JSON in the machine
readable stream: this way, users can easily parse the status of the
OCaml tool, and report that back.
The formatting of the current date time into the RFC 3999 format is done
in C, because of the lack of OCaml APIs for this.
---
common/mltools/Makefile.am | 2
2020 Sep 18
0
[PATCH common] mlutils: Simple wrapper around sysconf (_SC_NPROCESSORS_ONLN).
---
mlutils/unix_utils-c.c | 15 +++++++++++++++
mlutils/unix_utils.ml | 5 +++++
mlutils/unix_utils.mli | 9 +++++++++
3 files changed, 29 insertions(+)
diff --git a/mlutils/unix_utils-c.c b/mlutils/unix_utils-c.c
index 3309961..8acf039 100644
--- a/mlutils/unix_utils-c.c
+++ b/mlutils/unix_utils-c.c
@@ -77,6 +77,7 @@ extern value guestfs_int_mllib_mkdtemp (value val_pattern);
extern value
2020 Jan 22
0
[PATCH] mltools, options: support --allow-discards when decrypting LUKS devices
---
mltools/tools_utils-c.c | 8 ++++----
mltools/tools_utils.ml | 6 +++---
mltools/tools_utils.mli | 2 +-
options/decrypt.c | 5 +++--
options/inspect.c | 2 +-
options/options.h | 2 +-
6 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/mltools/tools_utils-c.c b/mltools/tools_utils-c.c
index 6c43b8d..1dcebc4 100644
--- a/mltools/tools_utils-c.c
+++
2017 Jul 21
0
[PATCH v2 01/23] daemon: Allow parts of the daemon and APIs to be written in OCaml.
This change allows parts of the daemon to be written in the OCaml
programming language. I am using the ‘Main Program in C’ method along
with ‘-output-obj’ to create an object file from the OCaml code /
runtime, as described here:
https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html
Furthermore, change the generator to allow individual APIs to be
implemented in OCaml. This is picked by
2020 Oct 03
0
[PATCH nbdkit v2 3/3] ocaml: Add bindings for nbdkit_peer_{pid, uid, gid}.
---
plugins/ocaml/NBDKit.mli | 7 +++++++
plugins/ocaml/NBDKit.ml | 4 ++++
plugins/ocaml/bindings.c | 24 ++++++++++++++++++++++++
3 files changed, 35 insertions(+)
diff --git a/plugins/ocaml/NBDKit.mli b/plugins/ocaml/NBDKit.mli
index ececd5fd..8abfeb49 100644
--- a/plugins/ocaml/NBDKit.mli
+++ b/plugins/ocaml/NBDKit.mli
@@ -162,3 +162,10 @@ val shutdown : unit -> unit
(** Print a
2019 Mar 28
0
[PATCH v2 4/4] OCaml tools: output messages into JSON for machine readable
When the machine readable mode is enabled, print all the messages
(progress, info, warning, and errors) also as JSON in the machine
readable stream: this way, users can easily parse the status of the
OCaml tool, and report that back.
The formatting of the current date time into the RFC 3999 format is done
in C, because of the lack of OCaml APIs for this.
---
.gitignore
2017 Jul 14
0
[PATCH 02/27] daemon: Allow parts of the daemon and APIs to be written in OCaml.
This change allows parts of the daemon to be written in the OCaml
programming language. I am using the ‘Main Program in C’ method along
with ‘-output-obj’ to create an object file from the OCaml code /
runtime, as described here:
https://caml.inria.fr/pub/docs/manual-ocaml/intfc.html
Furthermore, change the generator to allow individual APIs to be
implemented in OCaml. This is picked by
2020 Jan 27
3
[PATCH v2 1/2] mltools, options: support --allow-discards when decrypting LUKS devices
---
mltools/tools_utils-c.c | 8 ++++----
mltools/tools_utils.ml | 6 +++---
mltools/tools_utils.mli | 8 ++++++--
options/decrypt.c | 5 +++--
options/inspect.c | 2 +-
options/options.h | 2 +-
6 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/mltools/tools_utils-c.c b/mltools/tools_utils-c.c
index 6c43b8d..1dcebc4 100644
--- a/mltools/tools_utils-c.c
+++
2017 Mar 13
0
[PATCH] mllib: Add a binding for realpath(3).
This is a copy of the supermin binding:
https://github.com/libguestfs/supermin/tree/master/src realpath*
---
mllib/unix_utils-c.c | 18 ++++++++++++++++++
mllib/unix_utils.ml | 4 ++++
mllib/unix_utils.mli | 5 +++++
3 files changed, 27 insertions(+)
diff --git a/mllib/unix_utils-c.c b/mllib/unix_utils-c.c
index f5aaaf6..7e90541 100644
--- a/mllib/unix_utils-c.c
+++ b/mllib/unix_utils-c.c
@@
2017 Jul 14
0
[PATCH 16/27] daemon: Generate OCaml wrappers for optgroup_*_available functions.
It is sometimes useful to be able to call these from OCaml code.
---
generator/daemon.ml | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/generator/daemon.ml b/generator/daemon.ml
index fd01e5d8a..1d7461f8c 100644
--- a/generator/daemon.ml
+++ b/generator/daemon.ml
@@ -976,6 +976,10 @@ let generate_daemon_optgroups_c () =
generate_header CStyle
2017 Aug 03
0
[PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
For Device parameters we expect a block device name. However we were
only testing for "/dev/..." and so chardevs (from the appliance) could
be passed here, resulting in strange effects. This adds a function
is_device_parameter which tests for a valid block device name.
For Dev_or_Path parameters much the same, except we can also use the
is_device_parameter function elsewhere in the
2019 Nov 29
1
[PATCH] ocaml: add handling for errno ENOSPC
---
generator/OCaml.ml | 1 +
1 file changed, 1 insertion(+)
diff --git a/generator/OCaml.ml b/generator/OCaml.ml
index 92a913015..363aa5232 100644
--- a/generator/OCaml.ml
+++ b/generator/OCaml.ml
@@ -41,6 +41,7 @@ let ocaml_errnos = [
"ESRCH";
"ENOENT";
"EROFS";
+ "ENOSPC";
]
(* Generate the OCaml bindings interface. *)
--
2.21.0
2017 Sep 08
2
[PATCH] RFC: v2v: add and use libvirt connection objects
Enhance the Libvirt_utils module with libvirt connection objects,
and read-only and read-writen open functions for them; adapt the rest of
the mini-binding to use these objects, instead of opening + closing
libvirt connections every time. This has different improvements:
a) a libvirt connection is reused for different API calls, improving
the communication with remote (input) servers
b)
2019 Apr 08
0
[PATCH v4 1/7] v2v: require libvirt
While there are input modes that do not use libvirt, making libvirt
mandatory for virt-v2v slightly simplifies the code now, and allow for
further improvements/integration with libvirt later on.
---
Makefile.am | 2 ++
v2v/Makefile.am | 20 ++++++--------------
v2v/libvirt_utils-c.c | 22 ----------------------
v2v/v2v.ml | 12 +++---------
4 files changed, 11
2016 Aug 24
1
[PATCH] v2v: Allow libvirt >= 2.1.0 to be used for Xen and vCenter conversions.
Libvirt >= 2.1.0 now allows you to open files which have a "json:"
QEMU pseudo-URL as backingfile, whereas previously it would fail hard
in this case (RHBZ#1134878).
When virt-v2v performs conversions from Xen (over SSH) or vCenter
(over HTTPS) it uses these pseudo-URLs as backingfiles. We had to
tell people to use LIBGUESTFS_BACKEND=direct to avoid libvirt in this
situation.
This