1 #include <exec/types.h>
5 #include "kvm_errors.h"
7 ssize_t
kvm_read(kvm_t
*kd
, unsigned long addr
, void *buf
, size_t nbytes
)
9 if (kd
== (kvm_t
*)(O_WRONLY
|0xdead0000)) {
10 __kvm_errno
= KVMERR_NOACCESS
;
14 memcpy (buf
, (void *)addr
, nbytes
);
17 __kvm_errno
= KVMERR_BADADDRESS
;