external block_stats : [>`R] t -> string -> block_stats = "ocaml_libvirt_domain_block_stats"
external interface_stats : [>`R] t -> string -> interface_stats = "ocaml_libvirt_domain_interface_stats"
external block_peek : [>`R] t -> string -> int64 -> int -> string -> int -> unit = "ocaml_libvirt_domain_block_peek_bytecode" "ocaml_libvirt_domain_block_peek_native"
- external memory_peek : [>`R] t -> memory_flag -> int64 -> int -> string -> int -> unit = "ocaml_libvirt_domain_memory_peek_bytecode" "ocaml_libvirt_domain_memory_peek_native"
+ external memory_peek : [>`R] t -> memory_flag list -> int64 -> int -> string -> int -> unit = "ocaml_libvirt_domain_memory_peek_bytecode" "ocaml_libvirt_domain_memory_peek_native"
external const : [>`R] t -> ro t = "%identity"
end
If successful then the data is written into [buf] starting
at offset [boff], for [size] bytes. *)
- val memory_peek : [>`R] t -> memory_flag -> int64 -> int -> string -> int ->
- unit
+ val memory_peek : [>`R] t -> memory_flag list -> int64 -> int ->
+ string -> int -> unit
(** [memory_peek dom Virtual offset size] reads [size] bytes
at [offset] in the domain's virtual memory.
for (; flagsv != Val_int (0); flagsv = Field (flagsv, 1))
{
flagv = Field (flagsv, 0);
- if (flagv == Int_val(0))
+ if (flagv == Val_int (0))
flags |= VIR_MIGRATE_LIVE;
}
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRDOMAINMEMORYPEEK
extern int virDomainMemoryPeek (virDomainPtr domain,
- unsigned long long offset,
+ unsigned long long start,
size_t size,
void *buffer,
unsigned int flags)
#endif
CAMLprim value
-ocaml_libvirt_domain_memory_peek_native (value domv, int flagsv, value offsetv, value sizev, value bufferv, value boffv)
+ocaml_libvirt_domain_memory_peek_native (value domv, value flagsv, value offsetv, value sizev, value bufferv, value boffv)
{
#ifdef HAVE_VIRDOMAINMEMORYPEEK
CAMLparam5 (domv, flagsv, offsetv, sizev, bufferv);
/* Check that the return buffer is big enough. */
if (caml_string_length (bufferv) < boff + size)
- caml_failwith ("virDomainBlockPeek: return buffer too short");
+ caml_failwith ("virDomainMemoryPeek: return buffer too short");
/* Do flags. */
for (; flagsv != Val_int (0); flagsv = Field (flagsv, 1))
{
flagv = Field (flagsv, 0);
- if (flagv == Int_val (0))
+ if (flagv == Val_int (0))
flags |= VIR_MEMORY_VIRTUAL;
}
cmd3 print_string
(fun dom offset size ->
let buf = String.create size in
- D.memory_peek dom D.Virtual offset size buf 0;
+ D.memory_peek dom [D.Virtual] offset size buf 0;
buf)
(arg_readonly_connection domain_of_string)
Int64.of_string int_of_string,