X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=lib%2Fdiskimage_utils.mli;h=9eccf647f17ea540fde3f918386edbd49ff2c748;hb=85e0fa36cd0d2ff50e4d6c5811fc9761553be1c3;hp=641483d89e6eed074d1427c774232712d5f36519;hpb=e1e5cfb926e886b8fc3126429d045b8ba305fe50;p=virt-df.git diff --git a/lib/diskimage_utils.mli b/lib/diskimage_utils.mli index 641483d..9eccf64 100644 --- a/lib/diskimage_utils.mli +++ b/lib/diskimage_utils.mli @@ -91,6 +91,7 @@ and disk_content = and partitions = { parts_plugin_id : parts_plugin_id; + parts_dev : device; parts : partition list; } and partition = { @@ -124,6 +125,7 @@ and filesystem = { and pv = { lvm_plugin_id : lvm_plugin_id; + pv_dev : device; pv_uuid : string; } and lv = { @@ -142,6 +144,14 @@ val canonical_uuid : string -> string val group_by : ?cmp:('a -> 'a -> int) -> ('a * 'b) list -> ('a * 'b list) list (** Group a sorted list of pairs by the first element of the pair. *) +val sort_uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list +(** [sort_uniq xs] returns the list [xs], sorted and with all duplicate + elements removed. *) + +val uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list +(** [uniq xs] removes adjacent duplicate elements from a list, like + the Unix uniq(1) command. *) + val range : int -> int -> int list (** [range a b] returns the list of integers [a <= i < b]. If [a >= b] then the empty list is returned.