search for: speclist

Displaying 20 results from an estimated 33 matches for "speclist".

2018 Sep 20
1
Re: [PATCH 1/2] mltools: create a cmdline_options struct
...common/mltools/tools_utils.mli > +++ b/common/mltools/tools_utils.mli > @@ -74,7 +74,13 @@ val machine_readable : unit -> machine_readable_fn option > readable output to, in case it was enabled via > [--machine-readable]. *) > > -val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> ?machine_readable:bool -> Getopt.usage_msg -> Getopt.t > +type cmdline_options = { > + getopt : Getopt.t; (** The actual Getopt handle. *) > +} > +(** Structure representing all the data needed for handling c...
2016 Jul 13
0
[PATCH v3 2/2] mllib: Getopt: support hidden options
...den_option_description; ] in (* Decide whether the help option can be added, and which switches use. *) diff --git a/mllib/getopt.mli b/mllib/getopt.mli index 9d9737e..2a8bada 100644 --- a/mllib/getopt.mli +++ b/mllib/getopt.mli @@ -47,6 +47,8 @@ type anon_fun = (string -> unit) type speclist = (keys * spec * doc) list +val hidden_option_description : string + val compare_command_line_args : string -> string -> int (** Compare command line arguments for equality, ignoring any leading [-]s. *) @@ -60,6 +62,8 @@ val create : speclist -> ?anon_fun:anon_fun -> usage_msg -&...
2018 Sep 19
0
[PATCH 1/2] mltools: create a cmdline_options struct
...2b78a..99984bfa1 100644 --- a/common/mltools/tools_utils.mli +++ b/common/mltools/tools_utils.mli @@ -74,7 +74,13 @@ val machine_readable : unit -> machine_readable_fn option readable output to, in case it was enabled via [--machine-readable]. *) -val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> ?machine_readable:bool -> Getopt.usage_msg -> Getopt.t +type cmdline_options = { + getopt : Getopt.t; (** The actual Getopt handle. *) +} +(** Structure representing all the data needed for handling command + line opt...
2016 Sep 19
0
[PATCH 2/3] mllib: expose disk decrypt functionalities
...i index de95f9d..68c0d54 100644 --- a/mllib/common_utils.mli +++ b/mllib/common_utils.mli @@ -260,10 +260,13 @@ val parse_resize : int64 -> string -> int64 val human_size : int64 -> string (** Converts a size in bytes to a human-readable string. *) -val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> Getopt.usage_msg -> Getopt.t +val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> Getopt.usage_msg -> Getopt.t (** Adds the standard libguestfs command line options to the specified ones, sorting...
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...args. *) - -val compare_command_line_args : string -> string -> int -(** Compare command line arguments for equality, ignoring any leading [-]s. *) - -val set_standard_options : (Arg.key * Arg.spec * Arg.doc) list -> (Arg.key * Arg.spec * Arg.doc) list +val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> Getopt.usage_msg -> Getopt.t (** Adds the standard libguestfs command line options to the specified ones, sorting them, and setting [long_options] to them. - Returns the resulting options. *) + Returns a new [Getopt.t] handle. *) val compare...
2019 Jan 16
0
[PATCH 2/5] mltools: create a new external_command_code
...e (List.length cmds) 0 in let pids = List.mapi ( diff --git a/common/mltools/tools_utils.mli b/common/mltools/tools_utils.mli index ab70f583e..fb998697c 100644 --- a/common/mltools/tools_utils.mli +++ b/common/mltools/tools_utils.mli @@ -100,6 +100,14 @@ val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?k val external_command : ?echo_cmd:bool -> string -> string list (** Run an external command, slurp up the output as a list of lines. + A non-zero exit code of the command is considered a fatal error. + + [echo_cmd] specifies whether to output...
2018 Sep 19
5
[PATCH 0/2] RFC: --key option for tools
Hi, the following series adds a --key option in the majority of tools: this makes it possible to pass LUKS credentials programmatically, avoid the need to manually input them, or unsafely pass them via stdin. Thanks, Pino Toscano (2): mltools: create a cmdline_options struct Introduce a --key option in tools that accept keys builder/cmdline.ml | 2 +-
2019 Jan 16
2
Re: [PATCH 2/5] mltools: create a new external_command_code
...et pids = > List.mapi ( > diff --git a/common/mltools/tools_utils.mli b/common/mltools/tools_utils.mli > index ab70f583e..fb998697c 100644 > --- a/common/mltools/tools_utils.mli > +++ b/common/mltools/tools_utils.mli > @@ -100,6 +100,14 @@ val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?k > > val external_command : ?echo_cmd:bool -> string -> string list > (** Run an external command, slurp up the output as a list of lines. > + A non-zero exit code of the command is considered a fatal error. > + > + [echo_cmd...
2019 Jan 16
10
[PATCH 0/5] [RFC] builder: handle unavailable repos
In case a repository of virt-builder references files (e.g. the index) that cannot be downloaded (network issues, 404, etc) then virt-builder errors out on this situation. This is not a nice situation, from an user POV. This series does some refactoring to allow to better handle downloading failures, and handle the failures gracefully in virt-builder. RFC because I'm not yet too convinced
2018 Aug 20
2
[PATCH 1/2] mlstdutils/mltools: factorize the machine-readable option
....44fd20be3 100644 --- a/common/mltools/tools_utils.mli +++ b/common/mltools/tools_utils.mli @@ -64,13 +64,16 @@ val parse_resize : int64 -> string -> int64 val human_size : int64 -> string (** Converts a size in bytes to a human-readable string. *) -val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> Getopt.usage_msg -> Getopt.t +val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> ?machine_readable:bool -> Getopt.usage_msg -> Getopt.t (** Adds the standard libguestfs command...
2018 Aug 21
0
[PATCH 2/2] OCaml tools: add output selection for --machine-readable
...a human-readable string. *) +val machine_readable_printf : ('a, out_channel, unit) format -> 'a +(** Function to output something to the separate machine-readable + stream. + + It must be used {b only} when {!machine_readable} is [true]. *) + val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> ?machine_readable:bool -> Getopt.usage_msg -> Getopt.t (** Adds the standard libguestfs command line options to the specified ones, sorting them, and setting [long_options] to them. diff --git a/dib/cmdline.ml b/dib/cmdline.ml i...
2016 Sep 19
6
[PATCH 0/3] add crypto/LUKS support in some OCaml-based tools
Hi, this series refactors some guestfish code (not much), and exposes it via Common_utils, so it is possible to decrypt LUKS partitions when using virt-customize, virt-get-kernel, virt-sparsify, and virt-sysprep. This brings them closer in features with C tools. Most probably a couple more of other OCaml-based tools (virt-v2v to convert encrypted guests, and virt-builder to use encrypted
2018 Aug 21
4
[PATCH 0/2] RFC: add output selection for --machine-readable
Hi, this is a first approach (hence RFC, since it misses tests & documentation) in selecting the output for --machine-readable. The possible choices are: * --machine-readable: to stdout, like before * --machine-readable=file:name-of-file: to the specified file * --machine-readable=stream:stdout: explicitly to stdout * --machine-readable=stream:stderr: explicitly to stderr This makes it
2018 Aug 23
0
[PATCH v2 2/2] OCaml tools: add output selection for --machine-readable
...round + limitations in returned values. *) +val machine_readable : unit -> machine_readable_fn option +(** Returns the printf-like function to use to write all the machine + readable output to, in case it was enabled via + [--machine-readable]. *) + val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> ?machine_readable:bool -> Getopt.usage_msg -> Getopt.t (** Adds the standard libguestfs command line options to the specified ones, sorting them, and setting [long_options] to them. diff --git a/dib/cmdline.ml b/dib/cmdline.ml i...
2016 Jun 27
0
Re: [PATCH] RFC: OCaml tools: add and use a Getopt module
...the single dash double letter options. > +type doc = string > +type usage_msg = string > +type anon_fun = (string -> unit) > + > +val parse_argv : string array -> > + (keys * spec * doc) list -> ?anon_fun:anon_fun -> usage_msg -> unit > +(** [Getopt.parse args speclist ?anon_fun usage_msg] parses the > + specified arguments. > + > + [args] is the array with command line arguments, with the first > + element representing the application name/path. > + > + [speclist] is a list of triples [(keys, spec, doc)]: [keys] is a > + list...
2016 Jul 15
5
[PATCH 0/3] mllib: Various fixes and changes to Getopt module.
The second patch is obviously not complete yet - for discussion only. Rich.
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
...t, and the second is the reference to be set. *) + +type keys = string list +type doc = string +type usage_msg = string +type anon_fun = (string -> unit) + +val parse_argv : string array -> + (keys * spec * doc) list -> ?anon_fun:anon_fun -> usage_msg -> unit +(** [Getopt.parse args speclist ?anon_fun usage_msg] parses the + specified arguments. + + [args] is the array with command line arguments, with the first + element representing the application name/path. + + [speclist] is a list of triples [(keys, spec, doc)]: [keys] is a + list of options, [spec] is the associate...
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
...t, and the second is the reference to be set. *) + +type keys = string list +type doc = string +type usage_msg = string +type anon_fun = (string -> unit) + +val parse_argv : string array -> + (keys * spec * doc) list -> ?anon_fun:anon_fun -> usage_msg -> unit +(** [Getopt.parse args speclist ?anon_fun usage_msg] parses the + specified arguments. + + [args] is the array with command line arguments, with the first + element representing the application name/path. + + [speclist] is a list of triples [(keys, spec, doc)]: [keys] is a + list of options, [spec] is the associate...
2018 Aug 23
3
[PATCH v2 0/2] add output selection for --machine-readable
Hi, this adds the possibility to select the output for --machine-readable in OCaml tools. The possible choices are: * --machine-readable: to stdout, like before * --machine-readable=file:name-of-file: to the specified file * --machine-readable=stream:stdout: explicitly to stdout * --machine-readable=stream:stderr: explicitly to stderr This makes it possible to add additional output for
2017 Feb 02
7
[PATCH 0/6] dib: various improvements
Hi, this series improves virt-dib, adding some upstream changes, and refactoring the handling of output formats. Thanks, Pino Toscano (6): dib: clear up "already provided" message dib: add --checksum dib: pass custom mkfs options after the filesystem type dib: refactor output formats handling dib: clarify "output:" lines in --machine-readable documentation dib: