search for: display_long_options

Displaying 20 results from an estimated 57 matches for "display_long_options".

2014 Nov 26
5
[PATCH] tools: implement --short-options
...t;, 0, 0, 0, }, { "verbose", 0, 0, 'v' }, { "version", 0, 0, 'V' }, @@ -143,6 +144,8 @@ main (int argc, char *argv[]) case 0: /* options which are long only */ if (STREQ (long_options[option_index].name, "long-options")) display_long_options (long_options); + else if (STREQ (long_options[option_index].name, "short-options")) + display_short_options (options); else if (STREQ (long_options[option_index].name, "format")) { OPTION_format; } else if (STREQ (long_options[option_index].na...
2016 May 03
1
[PATCH] mllib: add "internal" to the description of --{short, long}-options
...@ -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"; + "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options (internal)"; + "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options (internal)"...
2015 Aug 31
2
[PATCH 1/2] mllib: add and use set_standard_options
..."short|long|json" ^ " " ^ s_"Set the format for --list (default: short)"; - "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options"; - "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options"; "--machine-readable", Arg.Set machine_readable, " " ^ s_"Make output machine readable"; "-m", Arg.Int set_memsize, "mb" ^ " " ^ s_"Set memory size"; &q...
2015 Sep 01
1
Re: [PATCH 2/2] mllib: set --debug-gc as common option
...e 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 Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software ins...
2014 Oct 01
1
[PATCH] sysprep: add no-op --no-selinux-relabel (RHBZ#1148072)
.../main.ml b/sysprep/main.ml index ea94728..f32c4ad 100644 --- a/sysprep/main.ml +++ b/sysprep/main.ml @@ -140,6 +140,8 @@ let main () = "--list-operations", Arg.Unit list_operations, " " ^ s_"List supported operations"; "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options"; "--mount-options", Arg.Set_string mount_opts, s_"opts" ^ " " ^ s_"Set mount options (eg /:noatime;/var:rw,noatime)"; + "--no-selinux-relabel", Arg.Unit (fun () -> ()), +...
2016 Aug 25
1
Re: [PATCH 5/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).
...,7 +110,11 @@ main (int argc, char *argv[]) > > switch (c) { > case 0: /* options which are long only */ > - if (STREQ (long_options[option_index].name, "fd")) { > + if (STREQ (long_options[option_index].name, "long-options")) > + display_long_options (long_options); > + else if (STREQ (long_options[option_index].name, "short-options")) > + display_short_options (options); > + else if (STREQ (long_options[option_index].name, "fd")) { > if (sscanf (optarg, "%d", &fd) != 1 ||...
2016 Jul 13
0
[PATCH v3 2/2] mllib: Getopt: support hidden options
...Buffer.output_buffer stdout b; exit 0 @@ -158,8 +165,8 @@ let create specs ?anon_fun usage_msg = } in let specs = specs @ [ - [ "--short-options" ], Unit (display_short_options t), s_"List short options (internal)"; - [ "--long-options" ], Unit (display_long_options t), s_"List long options (internal)"; + [ "--short-options" ], Unit (display_short_options t), hidden_option_description; + [ "--long-options" ], Unit (display_long_options t), hidden_option_description; ] in (* Decide whether the help option can be added...
2017 Mar 24
1
[PATCH] bash: Implement tab completion for virt-win-reg (RHBZ#1367738).
...ptions ("help|?" => \$help, "merge" => \$merge, "encoding=s" => \$encoding, "unsafe-printable-strings" => \$unsafe_printable_strings, - ) or pod2usage (2); + "long-options" => \&display_long_options, + "short-options" => \&display_short_options); +GetOptions (%opts) or pod2usage (2); pod2usage (1) if $help; if ($version) { my $g = Sys::Guestfs->new (); @@ -238,6 +240,22 @@ if ($version) { exit } +sub display_long_options +{ + foreach (sort keys...
2015 Aug 31
0
[PATCH 2/2] mllib: set --debug-gc as common option
...libvirt guest name"; "-n", Arg.Set dryrun, " " ^ s_"Perform a dry run"; diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 2b7d88d..62d72b1 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -511,6 +511,9 @@ let display_long_options () = exit 0 let set_standard_options argspec = + (** 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_&quo...
2016 Aug 25
7
[PATCH 0/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).
This implements most of RHBZ#1367738. I didn't bother with virt-v2v-copy-to-local and virt-win-reg, but all the other tools now have full bash completion. Rich.
2016 Jul 18
2
Re: [PATCH v2 2/3] mllib: Use L"..." and S '...' for long and short options.
...own options, and sorted. *) > - anon_fun = anon_fun; > - usage_msg = usage_msg; > - } in > - > - let specs = specs @ [ > - [ "--short-options" ], Unit (display_short_options t), hidden_option_description; > - [ "--long-options" ], Unit (display_long_options t), hidden_option_description; > - ] in > - > - (* Decide whether the help option can be added, and which switches use. *) > - let has_dash_help = ref false in > - let has_dash_dash_help = ref false in > - List.iter ( > - fun (keys, _, _) -> > - if not (!has...
2019 Oct 29
2
[PATCH] fish: add option --blocksize for disks
...n long_options[] = { { "add", 1, 0, 'a' }, + { "blocksize", 1, 0, 0 }, { "cmd-help", 2, 0, 'h' }, { "connect", 1, 0, 'c' }, { "csh", 0, 0, 0 }, @@ -259,6 +261,9 @@ main (int argc, char *argv[]) display_long_options (long_options); else if (STREQ (long_options[option_index].name, "short-options")) display_short_options (options); + else if (STREQ (long_options[option_index].name, "blocksize")) { + blocksize = strtol(optarg, NULL, 0); + } else if (STRE...
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....
2014 Jan 16
5
[PATCH 0/3] Add JSON output for virt-builder
Hi, This small patch serie adds a JSON output for virt-builder. This way it is possible to parse the list of available templates, with no need to parse the unstructured and possibly changing short and long outputs of virt-builder. Pino Toscano (3): builder: small refactor of the list output builder: add --list-format builder: add a JSON output for --list builder/builder.ml
2018 Jun 27
0
[PATCH 1/3] test-tool: implement --short-options & --long-options
...{ 0, 0, 0, 0 } @@ -103,7 +106,11 @@ main (int argc, char *argv[]) switch (c) { case 0: /* options which are long only */ - if (STREQ (long_options[option_index].name, "qemu")) { + if (STREQ (long_options[option_index].name, "long-options")) + display_long_options (long_options); + else if (STREQ (long_options[option_index].name, "short-options")) + display_short_options (options); + else if (STREQ (long_options[option_index].name, "qemu")) { qemu = optarg; qemu_use_wrapper = 0; } -- 2.17.1
2014 Jan 16
0
[PATCH 2/3] builder: add --list-format
...ormat, + "short|long" ^ " " ^ s_"Set the format for --list (default: short)"; "--no-logfile", Arg.Set scrub_logfile, " " ^ s_"Scrub build log file"; "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options"; "-m", Arg.Int set_memsize, "mb" ^ " " ^ s_"Set memory size"; diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod index 9cbfbab..05abcc6 100644 --- a/builder/virt-builder.pod +++...
2015 Aug 11
0
[PATCH v2 15/17] v2v: add --in-place mode
...for -i disk)"; + "--in-place", Arg.Set in_place, " " ^ s_"Only tune the guest in the input VM"; "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options"; "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options"; "--machine-readable", Arg.Set machine_readable, " " ^ s_"Make output machine readable"; @@ -217,6 +219,7 @@ read the man page virt-v2v(1). let input_conn = match !input_conn with "" -> None | s -&gt...
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...s = ref ([] : (Arg.key * Arg.spec * Arg.doc) list) -let display_short_options () = - List.iter ( - fun (arg, _, _) -> - if String.is_prefix arg "-" && not (String.is_prefix arg "--") then - printf "%s\n" arg - ) !long_options; - exit 0 -let display_long_options () = - List.iter ( - fun (arg, _, _) -> - if String.is_prefix arg "--" && arg <> "--long-options" && - arg <> "--short-options" then - printf "%s\n" arg - ) !long_options; - exit 0 - -let set_standard...
2014 Jan 13
2
Re: [Bug 1046905] New: RFE: add argument to virt-sysprep to disable individual default operations
On Friday 10 January 2014 10:09:19 Richard W.M. Jones wrote: > On Thu, Jan 09, 2014 at 03:45:54PM +0000, Richard W.M. Jones wrote: > > On Thu, Jan 09, 2014 at 04:21:10PM +0100, Pino Toscano wrote: > > > + and set_operations op_string = > > > + let currentopset = > > > + match (!operations) with > > > > No need for parentheses around
2013 Aug 16
3
[PATCH v2] sysprep: added --mount-options option to mount selected
Nikita, Please take a look at the attached patch. I have rewritten it a little, and only lightly tested it. Rich.