search for: file_descr

Displaying 11 results from an estimated 11 matches for "file_descr".

2017 Jun 20
2
[PATCH v2 1/2] mllib: add new Common_utils.run_commands
...rnal_command : ?echo_cmd:bool -> string -> string list [echo_cmd] specifies whether to output the full command on verbose mode, and it's on by default. *) -val run_command : ?echo_cmd:bool -> string list -> int +val run_commands : ?echo_cmd:bool -> (string list * Unix.file_descr option * Unix.file_descr option) list -> int list +(** Run external commands in parallel without using a shell, + and return a list with their exit codes. + + The list of commands is composed as tuples: + - the first element is a list of command and its arguments + - the second eleme...
2017 Apr 07
1
[PATCH 1/2] mllib: add new Common_utils.run_commands
...mli +++ b/mllib/common_utils.mli @@ -359,6 +359,25 @@ val external_command : ?echo_cmd:bool -> string -> string list [echo_cmd] specifies whether to output the full command on verbose mode, and it's on by default. *) +val run_commands : ?echo_cmd:bool -> (string list * Unix.file_descr option * Unix.file_descr option) list -> int list +(** Run external commands in parallel without using a shell, + and return a list with their exit codes. + + The list of commands is composed as tuples: + - the first element is a list of command and its arguments + - the second eleme...
2018 Aug 17
8
[PATCH v3 4/4] v2v: Add --print-estimate option to print copy size
I rethought this again, as I think that it's a dangerous assumption to bake qemu-img measure output into our API. This patch series runs qemu-img measure behind the scenes, but then parses the output and sums it to a single number which we print. Doing that required a bit of reworking, moving the Jansson [JSON parser] bindings from virt-builder into the common directory and a couple of other
2019 Mar 28
0
[PATCH v2 3/4] common/mltools: allow fd for machine readable output
Allow to specify a file descriptor for the machine readable output. Use the same assumption as done in v2v, i.e. that Unix.file_descr is simply the int file descriptor. --- common/mltools/test-machine-readable.sh | 7 +++++++ common/mltools/tools_utils.ml | 11 ++++++++++- lib/guestfs.pod | 5 +++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/common/mltools/test-machine-read...
2019 Mar 28
8
[PATCH v2 0/4] OCaml tools: output messages as JSON machine
...by outputting all the messages of OCaml tools as JSON to the machine parseable stream. Related, although not strictly needed for this (and thus can be split if requested), is the addition of the fd format for the machine readable stream. Changes from v1: - use Obj.magic to convert int -> Unix.file_descr - add tests Pino Toscano (4): common/mltools: move the code for machine readable up common/mltools: make sure machine readable output is flushed common/mltools: allow fd for machine readable output OCaml tools: output messages into JSON for machine readable .gitignore...
2019 Oct 04
0
[PATCH libnbd 3/4] api: Add nbd_connect_socket.
...| SockAddrAndLen (n, _) -> n, None, None @@ -5431,6 +5469,7 @@ and ocaml_arg_to_string = function | Closure { cbargs } -> sprintf "(%s)" (ocaml_closuredecl_to_string cbargs) | Enum (_, { enum_prefix }) -> sprintf "%s.t" enum_prefix + | Fd _ -> "Unix.file_descr" | Flags (_, { flag_prefix }) -> sprintf "%s.t" flag_prefix | Int _ -> "int" | Int64 _ -> "int64" @@ -5482,6 +5521,7 @@ let ocaml_name_of_arg = function | BytesPersistOut (n, len) -> n | Closure { cbname } -> cbname | Enum (n, _) -...
2017 Nov 07
0
[PATCH] common/mlstdutils: Add with_openfile function.
...9,12 @@ val with_open_out : string -> (out_channel -> 'a) -> 'a return or if the function [f] throws an exception, so this is both safer and more concise than the regular function. *) +val with_openfile : string -> Unix.open_flag list -> Unix.file_perm -> (Unix.file_descr -> 'a) -> 'a +(** [with_openfile] calls function [f] with [filename] opened by the + {!Unix.openfile} function. The file is always closed either on + normal return or if the function [f] throws an exception, so this + is both safer and more concise than the regular function....
2019 Oct 04
4
[PATCH libnbd 1/4] generator: Allow long ‘name - shortdesc’ in man pages.
For commands with long names and/or short descriptors, you can end up going over 72 characters in the first line of the man page (causing podwrapper to complain). Wrap these lines. --- generator/generator | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generator/generator b/generator/generator index 7d3f656..ad1cb6b 100755 --- a/generator/generator +++ b/generator/generator
2019 Mar 22
8
[PATCH 0/4] OCaml tools: output messages as JSON machine
Enhance the output in machine parseable mode, by outputting all the messages of OCaml tools as JSON to the machine parseable stream. Related, although not strictly needed for this (and thus can be split if requested), is the addition of the fd format for the machine readable stream. Pino Toscano (4): common/mltools: move the code for machine readable up common/mltools: make sure machine
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
2017 Apr 27
4
[PATCH 0/4] common: Add a simple mini-library for handling qemu command and config files.
Currently we have an OCaml library for generating the qemu command line (used only by ‘virt-v2v -o qemu’). However we also generate a qemu command line in ‘lib/launch-direct.c’, and we might in future need to generate a ‘-readconfig’-compatible configuration file if we want to go beyond 10,000 drives for scalability testing. Therefore this patch series reimplements the qemu command line code as