(* Partitions. *)
and partitions = {
- parts_name : string; (* Name of partitioning scheme. *)
+ parts_plugin_id : parts_plugin_id; (* Partitioning scheme. *)
parts : partition list (* Partitions. *)
}
and partition = {
(* 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. *)
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