Fix 'make doc' rule.
[virt-mem.git] / lib / virt_mem_types.ml
index c3da932..f8d3f0f 100644 (file)
@@ -29,25 +29,18 @@ type ksym = string
 
 module Ksymmap = Map.Make (String)
 
-type image0 = {
+type ksymmap = addr Ksymmap.t
+
+type image = {
   dom : Libvirt.ro D.t option;
   domname : string;
-  arch : Virt_mem_utils.architecture;
+  arch : architecture;
   mem : ([`Wordsize], [`Endian], [`HasMapping]) Virt_mem_mmap.t;
   kernel_min : addr;
   kernel_max : addr;
 }
 
-type image1 =
-    image0
-    * addr Ksymmap.t
-
-type image2 =
-    image0
-    * addr Ksymmap.t
-    * utsname option
-
-and utsname = {
+type utsname = {
   kernel_name : string;
   nodename : string;
   kernel_release : string;
@@ -56,6 +49,20 @@ and utsname = {
   domainname : string;
 }
 
+type kdata = {
+  ksyms : ksymmap option;
+  utsname : utsname option;
+  tasks : Virt_mem_mmap.addr option;
+  net_devices : Virt_mem_mmap.addr option;
+}
+
+exception ParseError of string * string * string
+
+type fieldsig = {
+  field_available : bool;
+  field_offset : int;
+}
+
 (* This is the maximum we can download in one go over the libvirt
  * remote connection.
  *
@@ -81,7 +88,7 @@ let _load_memory mem dom start size =
   in
   loop 0;
 
-  add_string mem str start
+  Virt_mem_mmap.add_string mem str start
 
 let load_static_memory ~dom ~domname ~arch ~wordsize ~endian
     ~kernel_min ~kernel_max start size =
@@ -110,7 +117,7 @@ let load_memory ({ dom = dom; mem = mem; kernel_min = kernel_min;
   else if start +^ Int64.of_int size > kernel_max then
     raise (LoadMemoryError (AddressOutOfRange,
                            "load_memory: start+size > kernel_max"))
-  else if is_mapped_range mem start size then image
+  else if Virt_mem_mmap.is_mapped_range mem start size then image
   else (
     match dom with
     | None ->