search for: set_standard_opt

Displaying 17 results from an estimated 17 matches for "set_standard_opt".

2015 Aug 31
2
[PATCH 1/2] mllib: add and use set_standard_options
...rgspec = - let cmp (arg1, _, _) (arg2, _, _) = - let arg1 = skip_dashes arg1 and arg2 = skip_dashes arg2 in - compare (String.lowercase arg1) (String.lowercase arg2) - in - List.sort cmp argspec in - let argspec = Arg.align argspec in - long_options := argspec; + let argspec = set_standard_options argspec in let args = ref [] in let anon_fun s = args := s :: !args in diff --git a/customize/customize_main.ml b/customize/customize_main.ml index 03c97e4..459e98a 100644 --- a/customize/customize_main.ml +++ b/customize/customize_main.ml @@ -85,8 +85,6 @@ let main () = "--dr...
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 +++ b/mllib/common_utils....
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 | 1 - sysprep/main.ml...
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 http://people.redhat.com/~rjones...
2016 May 03
1
[PATCH] mllib: add "internal" to the description of --{short, long}-options
...d them only for the bash completion scripts. --- 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...
2016 Jun 27
0
Re: [PATCH] RFC: OCaml tools: add and use a Getopt module
...t.Int ("vcpus", set_smp), s_"Set number of vCPUs"; > ] in > let customize_argspec, get_customize_ops = > Customize_cmdline.argspec () in > @@ -97,7 +91,6 @@ let main () = > let argspec = argspec @ customize_argspec in > let argspec = set_standard_options argspec in > > - let anon_fun _ = raise (Arg.Bad (s_"extra parameter on the command line")) in > let usage_msg = > sprintf (f_"\ > %s: customize a virtual machine > @@ -110,7 +103,7 @@ A short summary of the options is given below. For detailed help...
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
..."--smp" ], Getopt.Int ("vcpus", set_smp), s_"Set number of vCPUs"; ] in let customize_argspec, get_customize_ops = Customize_cmdline.argspec () in @@ -97,7 +91,6 @@ let main () = let argspec = argspec @ customize_argspec in let argspec = set_standard_options argspec in - let anon_fun _ = raise (Arg.Bad (s_"extra parameter on the command line")) in let usage_msg = sprintf (f_"\ %s: customize a virtual machine @@ -110,7 +103,7 @@ A short summary of the options is given below. For detailed help please read the man page vir...
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
..."--smp" ], Getopt.Int ("vcpus", set_smp), s_"Set number of vCPUs"; ] in let customize_argspec, get_customize_ops = Customize_cmdline.argspec () in @@ -97,7 +91,6 @@ let main () = let argspec = argspec @ customize_argspec in let argspec = set_standard_options argspec in - let anon_fun _ = raise (Arg.Bad (s_"extra parameter on the command line")) in let usage_msg = sprintf (f_"\ %s: customize a virtual machine @@ -110,7 +103,7 @@ A short summary of the options is given below. For detailed help please read the man page vir...
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...s_"Do not warn if writing to a partition"; ] in let customize_argspec, get_customize_ops = Customize_cmdline.argspec () in let customize_argspec = List.map (fun (spec, _, _) -> spec) customize_argspec in let argspec = argspec @ customize_argspec in - let argspec = set_standard_options argspec in let args = ref [] in let anon_fun s = push_front s args in @@ -192,7 +184,8 @@ A short summary of the options is given below. For detailed help please read the man page virt-builder(1). ") prog in - Arg.parse argspec anon_fun usage_msg; + let opthandle = crea...
2015 Sep 01
3
[PATCH 1/3] get-kernel: split command line handling in own function
...-names", Arg.Set unversioned, - " " ^ s_"Use unversioned names for files"; - "--prefix", Arg.String set_prefix, "prefix" ^ " " ^ s_"Prefix for files"; - ] in - let argspec = set_standard_options argspec in - let anon_fun _ = raise (Arg.Bad (s_"extra parameter on the command line")) in - let usage_msg = - sprintf (f_"\ +let parse_cmdline () = + let domain = ref None in + let file = ref None in + let libvirturi = ref "" in + let format = ref "...
2015 Oct 23
2
[PATCH 1/2] resize: add --unknown-filesystems
...rn off sparse copying"; + "--unknown-filesystems", Arg.Set_string unknown_fs_mode, + s_"ignore|warn|error" ^ " " ^ s_"Behaviour on expand unknown filesystems (default: warn)"; ] in let argspec = set_standard_options argspec in let disks = ref [] in @@ -253,6 +261,7 @@ read the man page virt-resize(1). let resizes_force = List.rev !resizes_force in let shrink = match !shrink with "" -> None | str -> Some str in let sparse = !sparse in + let unknown_fs_mode = !unknown_f...
2016 Jul 07
12
[PATCH v3 0/8] v2v: Move Curl wrapper to mllib and more.
v2 -> v3: - Changes to the Curl API suggested by Pino.
2016 Jul 07
9
[PATCH v2 0/8] v2v: Move Curl wrapper to mllib and use it for virt-builder (and more).
v1 -> v2: - Fixed the bug with precedence of if / @. - Add some imperative list operators inspired by Perl, and use those for constructing the Curl arguments, and more. Rich.
2015 Dec 14
4
[PATCH 0/2] resize: Split out the command line parsing into Cmdline
Some simple refactoring of virt-resize. I originally had the idea that we could turn virt-resize into a library (cf. virt-customize) and use it from virt-builder, but I now don't think that would make any meaningful difference. In particular we'd still have to open the handle the same number of times. These two patches are left over from my work on that. Rich.
2016 Apr 26
4
v2v: Remove --no-trim, --vmtype options and other fixes.
The first two patches implement the change discussed here: https://www.redhat.com/archives/libguestfs/2016-April/msg00178.html The third patch fixes the mapping of inspection data to OVF VmType which was inherited directly from old virt-v2v and had never been changed. It had a number of problems. The fourth patch is only slightly related to the others. It adds an extra slow test to ensure that
2016 Jun 18
8
[PATCH 0/7] p2v: Multiple improvements to the look of virt-p2v.
In the run dialog, I have implemented an ANSI colour escape sequence interpreter, so that colours displayed by the remote virt-v2v are now shown to the user. (https://bugzilla.redhat.com/show_bug.cgi?id=1314244) This requires virt-v2v to send colours. It wasn't doing that because the output was a pipe (as we capture the output into the log file). So I added a global --colours option to make
2015 Nov 19
4
[PATCH 0/4] v2v: Add a new tool virt-v2v-copy-to-local to handle Xen and ESXi
It turns out that RHEL 5 Xen conversions don't work if the source disk is located on a block device. See patch 1/4 for the gory details. This patch series proposes a new tool called virt-v2v-copy-to-local which essentially is a way to make new virt-v2v work like the old virt-v2v, ie. copy first, convert after. Of course this is very slow and would only be used as a last resort, but I