search for: combine3

Displaying 20 results from an estimated 24 matches for "combine3".

Did you mean: combine
2023 May 20
1
[libguestfs-common PATCH] Add support for OCaml 5.0
...++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlstdutils/std_utils.ml b/mlstdutils/std_utils.ml index 0d2fa22..86b21a7 100644 --- a/mlstdutils/std_utils.ml +++ b/mlstdutils/std_utils.ml @@ -341,12 +341,12 @@ module List = struct | x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs | _ -> invalid_arg "combine3" - let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function + let rec assoc_lbl ?(cmp = Stdlib.compare) ~default x = function | [] -> default | (y, y') :: _ when cmp x y = 0 -> y' | _ ::...
2015 Jan 28
4
[PATCH 0/3] sparsify: Ignore read-only LVs (RHBZ#1185561).
virt-sparsify shouldn't die if sparsifying a filesystem that contains read-only LVs. https://bugzilla.redhat.com/show_bug.cgi?id=1185561 I thought about trying to make the LV writable temporarily, but I suspect that if the sysadmin has made the LV read-only, then they probably did it for a reason, so we shouldn't touch it. Rich.
2014 Nov 25
3
[PATCH] mllib: use Unix.isatty
...--- mllib/common_utils.ml | 10 +++++----- mllib/progress.ml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 295981c..9fcd8dd 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -207,15 +207,15 @@ let rec combine3 xs ys zs = (* ANSI terminal colours. *) let ansi_green ?(chan = stdout) () = - if TTY.isatty_stdout () then output_string chan "\x1b[0;32m" + if Unix.isatty Unix.stdout then output_string chan "\x1b[0;32m" let ansi_red ?(chan = stdout) () = - if TTY.isatty_stdout () then...
2017 Nov 21
2
[PATCH v3 0/2] common/mlstdutils: Extend the List module.
v2 -> v3: - Renamed List.assoc_ -> List.assoc_lbl. - Rebased on top of current master branch. Rich.
2017 Oct 08
4
[PATCH 0/3] common/mlstdutils: Add Std_utils List and Option modules.
In Std_utils we already extend Char and String. These commits take it a little further by extending List and adding a new Option submodule. All basically simple refactoring. Rich.
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...
2017 Dec 08
3
[PATCH v2 0/2] v2v: -o null: Use the qemu null device driver.
This changes the infrastructure to allow the target_file to be a QEMU URI. Rich.
2017 Jun 15
0
[PATCH v6 04/41] mllib: Split ‘Common_utils’ into ‘Std_utils’ + ‘Common_utils’.
...t; find_map f xs + +let iteri f xs = + let rec loop i = function + | [] -> () + | x :: xs -> f i x; loop (i+1) xs + in + loop 0 xs + +let rec mapi i f = + function + | [] -> [] + | a::l -> + let r = f i a in + r :: mapi (i + 1) f l +let mapi f l = mapi 0 f l + +let rec combine3 xs ys zs = + match xs, ys, zs with + | [], [], [] -> [] + | x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs + | _ -> invalid_arg "combine3" + +let rec assoc ?(cmp = compare) ~default x = function + | [] -> default + | (y, y') :: _ when cmp x y = 0 -> y'...
2018 Mar 22
4
[PATCH INCOMPLETE 0/4] v2v: Add general mechanism for input and output options.
This patch isn't quite complete (see ‘assert false’). Currently we have a bunch of ad hoc options like --vddk* and --vdsm* (and proposed to add --rhv*) to handle extra parameters for input and output modes/transports. This complicates the command line parsing and also the clarity of the command line (becauseit's not very obvious which options apply to which side of the conversion).
2017 Jun 19
16
[PATCH v7 00/13] Refactor utilities
This is just the utilities part of the patch series from: https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html I believe this addresses everything raised in comments on that patch series. Rich.
2018 Feb 22
5
[PATCH v2 0/3] Make generated OVF more conforming to standard
The main reason for creating different OVF is that it can be used to create VM by oVirt REST API. The RHV export domain flavor cannot be used that way. v1 -> v2: - introduced flavour types instead of booleans - instead of referring to the new flavour as "standard OVF" or "fixed OVF" I refer to it as oVirt flavour. While it is more conforming than the one used in export
2017 Jun 09
12
[PATCH 00/12] Refactor utility functions.
This turned out to be rather more involved than I thought. We have lots of utility functions, spread all over the repository, with not a lot of structure. This moves many of them under common/ and structures them so there are clear dependencies. This doesn't complete the job by any means. Other items I had on my to-do list for this change were: - Split up mllib/common_utils into: -
2016 May 22
0
[PATCH 2/2] ocaml tools: Use a common debug function.
...et_file = images_dir // image_uuid // vol_uuid in - - if verbose () then - eprintf "RHEV: will export %s to %s\n%!" ov_sd target_file; + debug "RHEV: will export %s to %s" ov_sd target_file; { t with target_file = target_file } ) (combine3 targets image_uuids vol_uuids) in diff --git a/v2v/v2v.ml b/v2v/v2v.ml index e6ff8e2..18d343e 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -40,9 +40,9 @@ let rec main () = let cmdline, input, output = parse_cmdline () in (* Print the version, easier than asking users to tell us. *) - if ver...
2016 Dec 01
2
[PATCH] v2v: Rename RHEV to RHV throughout.
...t ov_sd = ov.ov_sd in let target_file = images_dir // image_uuid // vol_uuid in - debug "RHEV: will export %s to %s" ov_sd target_file; + debug "RHV: will export %s to %s" ov_sd target_file; { t with target_file = target_file } ) (combine3 targets image_uuids vol_uuids) in @@ -247,7 +247,7 @@ object ?clustersize path format size = Changeuid.func changeuid_t ( fun () -> - let g = open_guestfs ~identifier:"rhev_disk_create" () in + let g = open_guestfs ~identifier:"rhv_disk_create"...
2016 May 22
4
ocaml tools: Use a common debug function.
Add a Common_utils.debug function for printing messages only when in verbose mode. Rich.
2016 Dec 07
0
[PATCH v2] v2v: Rename RHEV to RHV throughout.
...t ov_sd = ov.ov_sd in let target_file = images_dir // image_uuid // vol_uuid in - debug "RHEV: will export %s to %s" ov_sd target_file; + debug "RHV: will export %s to %s" ov_sd target_file; { t with target_file = target_file } ) (combine3 targets image_uuids vol_uuids) in @@ -247,7 +247,7 @@ object ?clustersize path format size = Changeuid.func changeuid_t ( fun () -> - let g = open_guestfs ~identifier:"rhev_disk_create" () in + let g = open_guestfs ~identifier:"rhv_disk_create"...
2016 Dec 07
2
[PATCH v2] v2v: Rename RHEV to RHV throughout.
v2: - Fix virt-p2v messages too. Rich.
2016 May 23
7
[PATCH 1/5] mllib: make external_command echo the command executed
Add an optional parameter to disable this behaviour, so the Curl module in v2v won't print user-sensible data (like passwords). --- builder/checksums.ml | 1 - builder/downloader.ml | 1 - builder/sigchecker.ml | 1 - mllib/common_utils.ml | 4 +++- mllib/common_utils.mli | 7 +++++-- v2v/curl.ml | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git
2017 Jun 12
32
[PATCH v5 00/32] Refactor utilities, implement some APIs in OCaml.
This is a combination of: https://www.redhat.com/archives/libguestfs/2017-June/msg00046.html [PATCH 00/12] Refactor utility functions. plus: https://www.redhat.com/archives/libguestfs/2017-June/msg00023.html [PATCH v3 00/19] Allow APIs to be implemented in OCaml. with the second patches rebased on top of the utility refactoring, and some other adjustments and extensions. This passes
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.