Associate opaque plugin ID with each major structure.
[virt-df.git] / lib / diskimage.mli
index b0ecd8d..113c99b 100644 (file)
@@ -138,7 +138,7 @@ and disk_content =
     ]
 
 and partitions = {
-  parts_name : string;                 (** Name of partitioning scheme. *)
+  parts_plugin_id : parts_plugin_id;   (** Partitioning scheme. *)
   parts : partition list;              (** Partitions. *)
 }
 and partition = {
@@ -157,7 +157,7 @@ and partition_content =
     ]
 
 and filesystem = {
-  fs_name : string;                    (** Name of filesystem. *)
+  fs_plugin_id : fs_plugin_id;         (** Filesystem type. *)
   fs_block_size : int64;               (** Block size (bytes). *)
   fs_blocks_total : int64;             (** Total blocks. *)
   fs_is_swap : bool;                   (** If swap, following not valid. *)
@@ -181,11 +181,15 @@ and lv = {
 }
     (** Physical and logical volumes as used by LVM plug-ins. *)
 
+and parts_plugin_id
+and fs_plugin_id
 and lvm_plugin_id
+  (** Opaque IDs used to refer to the plug-ins. *)
 
-val string_of_partition : partition -> string
-val string_of_filesystem : filesystem -> string
-  (** Convert a partition or filesystem struct to a string (for debugging). *)
+val name_of_parts : parts_plugin_id -> string
+val name_of_filesystem : fs_plugin_id -> string
+val name_of_lvm : lvm_plugin_id -> string
+  (** Convert plug-in IDs to printable strings. *)
 
 (** {2 Scanning functions} *)