search for: set_debug_gc

Displaying 20 results from an estimated 26 matches for "set_debug_gc".

2015 Aug 31
0
[PATCH 2/2] mllib: set --debug-gc as common option
Move --debug-gc as common option for all the OCaml-based tools, even a couple of them which didn't have it previously. As implementation note, make set_debug_gc private to set_standard_options, as it needed to be moved otherwise, and it is no more required as public function. --- customize/customize_main.ml | 1 - mllib/common_utils.ml | 8 ++++---- mllib/common_utils.mli | 3 --- resize/resize.ml | 1 - sparsify/cmdline.ml |...
2015 Aug 31
2
[PATCH 1/2] mllib: add and use set_standard_options
...let argspec = Arg.align [ + let argspec = [ "-b", Arg.String add_bridge, "in:out " ^ s_"Map bridge 'in' to 'out'"; "--bridge", Arg.String add_bridge, "in:out " ^ ditto; "--debug-gc",Arg.Unit set_debug_gc, " " ^ s_"Debug GC and memory allocations"; @@ -146,8 +146,6 @@ let parse_cmdline () = "-ic", Arg.Set_string input_conn, "uri " ^ s_"Libvirt URI"; "-if", Arg.Set_string input_format, "format " ^ s_&...
2015 Aug 28
1
[PATCH] handle --debug-gc universally via at_exit hook
...URI"; "--connect", Arg.Set_string libvirturi, s_"uri" ^ " " ^ s_"Set libvirt URI"; - "--debug-gc", Arg.Set debug_gc, " " ^ s_"Debug GC and memory allocations (internal)"; + "--debug-gc", Arg.Unit set_debug_gc, " " ^ s_"Debug GC and memory allocations (internal)"; "-d", Arg.String set_domain, s_"domain" ^ " " ^ s_"Set libvirt guest name"; "--domain", Arg.String set_domain, s_"domain" ^ " &quo...
2015 Sep 01
1
Re: [PATCH 2/2] mllib: set --debug-gc as common option
On Mon, Aug 31, 2015 at 06:49:55PM +0200, Pino Toscano wrote: > Move --debug-gc as common option for all the OCaml-based tools, even a > couple of them which didn't have it previously. > > As implementation note, make set_debug_gc private to > set_standard_options, as it needed to be moved otherwise, and it is no > more required as public function. ACK series. I guess long_options, display_long_options and display_short_options also no longer need to be public? Rich. -- Richard Jones, Virtualization Group, Red Hat...
2016 May 03
1
[PATCH] mllib: add "internal" to the description of --{short, long}-options
...ripts. --- mllib/common_utils.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 3d6eb94..db8a298 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -575,8 +575,8 @@ let set_standard_options argspec = let set_debug_gc () = at_exit (fun () -> Gc.compact()) in let argspec = [ - "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options"; - "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options"; +...
2016 Sep 19
0
[PATCH 2/3] mllib: expose disk decrypt functionalities
...ar = struct include Char @@ -591,7 +595,7 @@ let human_size i = ) ) -let create_standard_options argspec ?anon_fun usage_msg = +let create_standard_options argspec ?anon_fun ?(key_opts = false) usage_msg = (** Install an exit hook to check gc consistency for --debug-gc *) let set_debug_gc () = at_exit (fun () -> Gc.compact()) in @@ -604,6 +608,14 @@ let create_standard_options argspec ?anon_fun usage_msg = [ L"color"; L"colors"; L"colour"; L"colours" ], Getopt.Unit set_colours, s_"Use ANSI colour sequences even if not...
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.
2018 Sep 19
0
[PATCH 1/2] mltools: create a cmdline_options struct
...259,10 @@ let machine_readable () = in Some { pr } +type cmdline_options = { + getopt : Getopt.t; +} + let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_readable = false) usage_msg = (** Install an exit hook to check gc consistency for --debug-gc *) let set_debug_gc () = @@ -306,7 +310,10 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_read [ L"machine-readable" ], Getopt.OptString ("format", parse_machine_readable), s_"Make output machine readable"; ] else []) in - Getopt.cre...
2015 Sep 01
3
[PATCH 1/3] mllib: make few command line options stuff private
Make print_version_and_exit, long_options, display_short_options, and display_long_options private, as set_standard_options now takes care of handling the job for the common command line options. --- mllib/common_utils.mli | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 79032bc..24f8f83 100644 --- a/mllib/common_utils.mli +++
2018 Aug 21
0
[PATCH 2/2] OCaml tools: add output selection for --machine-readable
...n + machine_readable_channel := Some chan; + chan + in + fprintf (get_machine_readable_channel ()) fs + let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_readable = false) usage_msg = (** Install an exit hook to check gc consistency for --debug-gc *) let set_debug_gc () = at_exit (fun () -> Gc.compact()) in + let parse_machine_readable = function + | None -> + machine_readable_output := Channel stdout; + set_machine_readable () + | Some fmt -> + let outtype, outname = String.split ":" fmt in + if outname = &quo...
2016 Jul 18
0
[PATCH v2 2/3] mllib: Use L"..." and S '...' for long and short options.
...ndex 3bbfa46..e7ee84a 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -19,6 +19,7 @@ open Printf open Common_gettext.Gettext +open Getopt.OptionName module Char = struct include Char @@ -571,13 +572,13 @@ let create_standard_options argspec ?anon_fun usage_msg = let set_debug_gc () = at_exit (fun () -> Gc.compact()) in let argspec = [ - [ "-V"; "--version" ], Getopt.Unit print_version_and_exit, s_"Display version and exit"; - [ "-v"; "--verbose" ], Getopt.Unit set_verbose, s_"Enable libguestfs debuggi...
2016 Jul 18
4
[PATCH v2 0/3] mllib: Various fixes and changes to Getopt module.
v1 -> v2: - Further fixes to Getopt int parsing. - Completed the L/S changes. - Fixed the test suite so it passes now. Also we don't need the special-case tests for 64 bit arch. Rich.
2016 Jul 18
3
[PATCH v4 0/2] mllib: Various fixes and changes to Getopt module.
v3 -> v4: - Pushed the first patch upstream since it was ACKed. - Prevent use of M except for the special virt-v2v options. - Sort the options after added --help etc. - Make corresponding fixes to the tests. Rich.
2016 Jul 18
4
[PATCH v3 0/3] mllib: Various fixes and changes to Getopt module.
v2 -> v3: - Add M variant and test it. Rich.
2016 Jun 27
0
Re: [PATCH] RFC: OCaml tools: add and use a Getopt module
...<> "--long-options" && > + arg <> "--short-options" then > + printf "%s\n" arg > + ) args > ) !long_options; > exit 0 > > @@ -584,27 +590,23 @@ let set_standard_options argspec = > let set_debug_gc () = > at_exit (fun () -> Gc.compact()) in > let argspec = [ > - "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options (internal)"; > - "--long-options", Arg.Unit display_long_options, " " ^ s_&q...
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
...refix arg "--" && arg <> "--long-options" && + arg <> "--short-options" then + printf "%s\n" arg + ) args ) !long_options; exit 0 @@ -584,27 +590,23 @@ let set_standard_options argspec = let set_debug_gc () = at_exit (fun () -> Gc.compact()) in let argspec = [ - "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options (internal)"; - "--long-options", Arg.Unit display_long_options, " " ^ s_"List long option...
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
...refix arg "--" && arg <> "--long-options" && + arg <> "--short-options" then + printf "%s\n" arg + ) args ) !long_options; exit 0 @@ -604,27 +610,23 @@ let set_standard_options argspec = let set_debug_gc () = at_exit (fun () -> Gc.compact()) in let argspec = [ - "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options (internal)"; - "--long-options", Arg.Unit display_long_options, " " ^ s_"List long option...
2018 Aug 20
2
[PATCH 1/2] mlstdutils/mltools: factorize the machine-readable option
...@@ let human_size i = ) ) -let create_standard_options argspec ?anon_fun ?(key_opts = false) usage_msg = +let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_readable = false) usage_msg = (** Install an exit hook to check gc consistency for --debug-gc *) let set_debug_gc () = at_exit (fun () -> Gc.compact()) in @@ -249,6 +249,11 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) usage_msg = [ L"echo-keys" ], Getopt.Unit c_set_echo_keys, s_"Don’t turn off echo for passphrases"; [ L"keys...
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...- arg <> "--short-options" then - printf "%s\n" arg - ) !long_options; - exit 0 - -let set_standard_options argspec = +let create_standard_options argspec ?anon_fun usage_msg = (** Install an exit hook to check gc consistency for --debug-gc *) let set_debug_gc () = at_exit (fun () -> Gc.compact()) in let argspec = [ - "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options (internal)"; - "--long-options", Arg.Unit display_long_options, " " ^ s_"List long option...
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