+(* This allows plug-ins to attach their own private data to
+ * the normal plug-in structures (partitions, filesystem, pv, etc.)
+ *)
+let private_data_functions get_key =
+ let h = Hashtbl.create 13 in
+ (fun struc data ->
+ Hashtbl.replace h (get_key struc) data),
+ (fun struc ->
+ try Hashtbl.find h (get_key struc)
+ with Not_found -> assert false (* internal error in the plug-in *))
+