X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=lib%2Fdiskimage_utils.ml;h=a98e75ef05a632fade314cb2e66bdc256cea081c;hb=3844c0e3ba0eb0e07b7ecabe7794def7dd622c2b;hp=9290af3e8afa03641aaecbb9ca06ae34b0eee232;hpb=9611aba66734efe3e2f1e0792a90003b657a89f5;p=virt-df.git diff --git a/lib/diskimage_utils.ml b/lib/diskimage_utils.ml index 9290af3..a98e75e 100644 --- a/lib/diskimage_utils.ml +++ b/lib/diskimage_utils.ml @@ -110,7 +110,7 @@ and disk_content = (* Partitions. *) and partitions = { - parts_name : string; (* Name of partitioning scheme. *) + parts_plugin_id : parts_plugin_id; (* Partitioning scheme. *) parts : partition list (* Partitions. *) } and partition = { @@ -128,7 +128,7 @@ and partition_content = (* Filesystems (also swap devices). *) and filesystem = { - fs_name : string; (* Name of filesystem. *) + fs_plugin_id : fs_plugin_id; (* Filesystem. *) fs_block_size : int64; (* Block size (bytes). *) fs_blocks_total : int64; (* Total blocks. *) fs_is_swap : bool; (* If swap, following not valid. *) @@ -152,24 +152,10 @@ and lv = { lv_dev : device; (* Logical volume device. *) } +and parts_plugin_id = string +and fs_plugin_id = string and lvm_plugin_id = string -(* Convert partition, filesystem types to printable strings for debugging. *) -let string_of_partition - { part_status = status; part_type = typ; part_dev = dev } = - sprintf "%s: %s partition type %d" - dev#name - (match status with - | Bootable -> "bootable" - | Nonbootable -> "nonbootable" - | Malformed -> "malformed" - | NullEntry -> "empty") - typ - -let string_of_filesystem { fs_name = name; fs_is_swap = swap } = - if not swap then name - else name ^ " [swap]" - (* Convert a UUID (containing '-' chars) to canonical form. *) let canonical_uuid uuid = let uuid' = String.make 32 ' ' in