X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdiskimage.mli;h=22ba927b58c693e8268170973a83af5542d8081e;hb=aedea1300349e088286d63a4bcd16a85d12c6a7c;hp=2373341ab68559aa26155f9d19ce01fb7f523903;hpb=66916209fa11b050af2f8b4ec184b26adf81d0a9;p=virt-df.git diff --git a/lib/diskimage.mli b/lib/diskimage.mli index 2373341..22ba927 100644 --- a/lib/diskimage.mli +++ b/lib/diskimage.mli @@ -303,6 +303,31 @@ val create_ownership : machine -> ownership ultimate filesystem, etc., which owns each one). *) +type owner = + [ `Filesystem of filesystem + | `Partitions of partitions + | `PhysicalVolume of pv ] + +val get_owners : + machine -> ownership -> device -> Int63.t -> (owner * Int63.t) list + (** [get_owners machine ownership disk offset] returns the + owners (filesystems, etc.) which reside on block device [disk] + at the given byte offset. [disk] must be a block device + of the machine. + + Returns a list of [(owner, owner_offset)] where [owner] + is the filesystem, etc., and [owner_offset] is the byte + offset relative to the owner. + + It is common for there to be multiple owners: for example + in the case where a filesystem is created on a partition, + both the filesystem ([`Filesystem fs]) and + partition scheme ([`Partitions parts]) will be returned. + + This function is efficient. {!create_ownership} creates + a tree structure which allows ownership to be determined + in just a few steps. *) + (** {2 Debugging} *) val debug : bool ref