X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=lib%2Fdiskimage_mbr.ml;h=009ef72c1b143448c9490e81ea56ab9bdec5b6e5;hb=8ecbebaf01f96a781ded3e24235697c62bc515b4;hp=30c5dc46129c2d6e1e0939679f50f744584e26a5;hpb=063c6a300ed7ed6a9ec99d22159b3e246d08a70a;p=virt-df.git diff --git a/lib/diskimage_mbr.ml b/lib/diskimage_mbr.ml index 30c5dc4..009ef72 100644 --- a/lib/diskimage_mbr.ml +++ b/lib/diskimage_mbr.ml @@ -91,7 +91,7 @@ let rec probe dev = let extendeds = List.concat extendeds in primaries @ extendeds *) - { parts_plugin_id = plugin_id; parts = primaries } + { parts_plugin_id = plugin_id; parts_dev = dev; parts = primaries } | { _ } -> raise Not_found (* not an MBR *) @@ -184,3 +184,13 @@ and uint64_of_int32 u32 = if u32 >= 0l then i64 else Int64.add i64 0x1_0000_0000_L *) + +(* XXX We don't currently keep enough data in the parts structure + * to allow us to reconstruct missing partition table entries. + *) +let offset_is_free _ _ = false + +let callbacks = { + parts_cb_probe = probe; + parts_cb_offset_is_free = offset_is_free; +}