search for: 5b0b9bb

Displaying 11 results from an estimated 11 matches for "5b0b9bb".

2016 Jul 07
0
[PATCH 1/3] mllib: add checking for btrfs subvolume
...ountable_subvolume fs + with Guestfs.Error msg as exn -> + if g#last_errno () = Guestfs.Errno.errno_EINVAL then "" + else raise exn in + device <> "" && subvol <> "" diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 5b0b9bb..d2ed30c 100644 --- a/mllib/common_utils.mli +++ b/mllib/common_utils.mli @@ -330,3 +330,6 @@ val inspect_mount_root : Guestfs.guestfs -> ?mount_opts_fn:(string -> string) -> val inspect_mount_root_ro : Guestfs.guestfs -> string -> unit (** Like [inspect_mount_root], but mounting e...
2016 Jul 08
0
[PATCHv2 1/3] mllib: add checking for btrfs subvolume
..._ -> "ro") + +let is_btrfs_subvolume g fs = + try + ignore (g#mountable_subvolume fs); true + with Guestfs.Error msg as exn -> + if g#last_errno () = Guestfs.Errno.errno_EINVAL then false + else raise exn diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 5b0b9bb..d2ed30c 100644 --- a/mllib/common_utils.mli +++ b/mllib/common_utils.mli @@ -330,3 +330,6 @@ val inspect_mount_root : Guestfs.guestfs -> ?mount_opts_fn:(string -> string) -> val inspect_mount_root_ro : Guestfs.guestfs -> string -> unit (** Like [inspect_mount_root], but mounting e...
2016 Jun 16
1
[PATCH] mllib: Add isspace, triml, trimr and trim functions.
...ction with the same name and + * different signature. + *) + let trim ?(test = isspace) str = + trimr ~test (triml ~test str) + let rec find s sub = let len = length s in let sublen = length sub in diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 5b0b9bb..a04a784 100644 --- a/mllib/common_utils.mli +++ b/mllib/common_utils.mli @@ -56,6 +56,14 @@ module String : sig (** [is_prefix str prefix] returns true if [prefix] is a prefix of [str]. *) val is_suffix : string -> string -> bool (** [is_suffix str suffix] returns true if [suf...
2016 Jul 07
0
[PATCH v3 4/8] mllib: Add some imperative list manipulation functions.
...| x :: xs -> x, xs + | [] -> failwith "shift" in + xsp := xs; + x + +let append xsp xs = xsp := !xsp @ xs +let prepend xs xsp = xsp := xs @ !xsp + let may f = function | None -> () | Some x -> f x diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 5b0b9bb..97c7d9f 100644 --- a/mllib/common_utils.mli +++ b/mllib/common_utils.mli @@ -141,6 +141,42 @@ val uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list val sort_uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list (** Sort and uniquify a list....
2016 Jul 08
4
[PATCHv2 0/3] fix btrfs subvolume procession in tools
sparsify case: modified guestfs_is_lv mllib: fixed is_btrfs_subvolume Maxim Perevedentsev (3): mllib: add checking for btrfs subvolume lvm: modify guestfs_is_lv to take mountable sysprep: fix btrfs subvolume processing in fs-uuids daemon/lvm.c | 6 ++++-- generator/actions.ml | 6 +++--- mllib/common_utils.ml | 7 +++++++
2016 Jul 07
7
[PATCH 0/3] fix btrfs subvolume procession in tools
This patcheset fixes errors in virt-sysprep and virt-sparsify. Here we have a common functionality: is_btrfs_subvolume. Doesn't it make sense to turn it into guestfs API? Also I found an issue. In 'virt-sysprep fs-uuids', the uuids for ALL filesystems are regenerated as many times as many roots are in guest. Is it done intentionally? Maxim Perevedentsev (3): mllib: add checking
2016 Jun 15
3
[PATCH 2/3] Convert source so it can be compiled with OCaml '-safe-string' option.
OCaml 4.02 introduced the 'bytes' type, a mutable string intended to replace the existing 'string' type for those cases where the byte array can be mutated. In future the 'string' type will become immutable. This is not the default now, but it can be forced using the '-safe-string' compile option. I tested this on Fedora 24 (OCaml 4.02) & RHEL 7 (OCaml 4.01).
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.
2016 Jun 27
0
Re: [PATCH] RFC: OCaml tools: add and use a Getopt module
...) = compare_command_line_args arg1 arg2 in > List.sort cmp argspec in > - let argspec = Arg.align argspec in > + let argspec = List.map snd argspec in > long_options := argspec; > argspec > > diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli > index 5b0b9bb..bd0cbbf 100644 > --- a/mllib/common_utils.mli > +++ b/mllib/common_utils.mli > @@ -222,7 +222,7 @@ val skip_dashes : string -> string > val compare_command_line_args : string -> string -> int > (** Compare command line arguments for equality, ignoring any leading [-]s. *)...
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
...arg2 in + let cmp (arg1, _) (arg2, _) = compare_command_line_args arg1 arg2 in List.sort cmp argspec in - let argspec = Arg.align argspec in + let argspec = List.map snd argspec in long_options := argspec; argspec diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 5b0b9bb..bd0cbbf 100644 --- a/mllib/common_utils.mli +++ b/mllib/common_utils.mli @@ -222,7 +222,7 @@ val skip_dashes : string -> string val compare_command_line_args : string -> string -> int (** Compare command line arguments for equality, ignoring any leading [-]s. *) -val set_standard_opti...