Added bitmap structure. Run ownership tests for sample block device.
[virt-df.git] / lib / diskimage.ml
index 697cb76..42e02dc 100644 (file)
@@ -301,7 +301,7 @@ let print_binary_tree leaf_printer node_printer tree =
   eprintf "/* Use 'dot -Tpng foo.dot > foo.png' to convert to a png file. */\n";
   eprintf "digraph G {\n";
   print tree;
-  eprintf "}\n";
+  eprintf "}\n%!";
 
 type owner =
     [ `Filesystem of filesystem
@@ -661,9 +661,9 @@ let create_ownership machine =
   (* Return the ownership structure. *)
   ownership
 
-let get_owners_lookup machine ownership disk =
+let get_owners_lookup machine ownership (disk : block_device) =
   (* Get the correct tree. *)
-  let tree = List.assoc disk ownership in
+  let tree = List.assoc (disk :> device) ownership in
 
   fun offset ->
     let rec query = function