Associate opaque plugin ID with each major structure.
[virt-df.git] / lib / diskimage_mbr.ml
index bd02f65..91ec20f 100644 (file)
@@ -26,6 +26,8 @@ open ExtList
 
 open Diskimage_utils
 
+let plugin_id = "mbr"
+
 let sector_size = 512
 let sector_size64 = 512L
 
@@ -56,7 +58,7 @@ end
 
     @raise Not_found if it is not an MBR.
  *)
-let rec probe_mbr dev =
+let rec probe dev =
   (* Read the first sector. *)
   let bits =
     try dev#read_bitstring 0L sector_size
@@ -87,7 +89,7 @@ let rec probe_mbr dev =
       let extendeds = List.concat extendeds in
       primaries @ extendeds
 *)
-      { parts_name = "MBR"; parts = primaries }
+      { parts_plugin_id = plugin_id; parts = primaries }
 
   | { _ } ->
       raise Not_found                  (* not an MBR *)