search for: formats_list

Displaying 8 results from an estimated 8 matches for "formats_list".

2018 Aug 22
1
Re: [PATCH 2/2] OCaml tools: add output selection for --machine-readable
...his works and you didn't need to use ksprintf. > (* No elements and machine-readable mode? Print some facts. *) > if elements = [] && machine_readable () then ( > - printf "virt-dib\n"; > + machine_readable_printf "virt-dib\n"; > let formats_list = Output_format.list_formats () in > - List.iter (printf "output:%s\n") formats_list; > + List.iter (machine_readable_printf "output:%s\n") formats_list; > exit 0 > ); So this caller would become: match machine_readable (), elements = [] with | No...
2018 Aug 21
0
[PATCH 2/2] OCaml tools: add output selection for --machine-readable
...ml +++ b/dib/cmdline.ml @@ -229,9 +229,9 @@ read the man page virt-dib(1). (* No elements and machine-readable mode? Print some facts. *) if elements = [] && machine_readable () then ( - printf "virt-dib\n"; + machine_readable_printf "virt-dib\n"; let formats_list = Output_format.list_formats () in - List.iter (printf "output:%s\n") formats_list; + List.iter (machine_readable_printf "output:%s\n") formats_list; exit 0 ); diff --git a/get-kernel/get_kernel.ml b/get-kernel/get_kernel.ml index f2949da89..34300d802 100644 ---...
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
...let python = !python in (* No elements and machine-readable mode? Print some facts. *) - if elements = [] && machine_readable () then ( - printf "virt-dib\n"; + (match elements, machine_readable () with + | [], Some { pr } -> + pr "virt-dib\n"; let formats_list = Output_format.list_formats () in - List.iter (printf "output:%s\n") formats_list; + List.iter (pr "output:%s\n") formats_list; exit 0 + | _, _ -> () ); if basepath = "" then diff --git a/dib/virt-dib.pod b/dib/virt-dib.pod index 369776173..f6e2...
2018 Aug 20
0
[PATCH 2/2] OCaml tools: simplify machine-readable handling
...ra_packages in let checksum = !checksum in let python = !python in (* No elements and machine-readable mode? Print some facts. *) - if elements = [] && machine_readable then ( + if elements = [] && machine_readable () then ( printf "virt-dib\n"; let formats_list = Output_format.list_formats () in List.iter (printf "output:%s\n") formats_list; diff --git a/get-kernel/get_kernel.ml b/get-kernel/get_kernel.ml index fca8a06db..f2949da89 100644 --- a/get-kernel/get_kernel.ml +++ b/get-kernel/get_kernel.ml @@ -31,7 +31,6 @@ let parse_cmdline () =...
2018 Aug 20
2
[PATCH 1/2] mlstdutils/mltools: factorize the machine-readable option
Store the machine-readable flag globally, just like done for verbose/debug/etc, and enhance create_standard_options to provide --machine-readable automatically. --- common/mlstdutils/std_utils.ml | 4 ++++ common/mlstdutils/std_utils.mli | 7 +++++-- common/mltools/tools_utils.ml | 7 ++++++- common/mltools/tools_utils.mli | 5 ++++- 4 files changed, 19 insertions(+), 4 deletions(-) diff
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: