diff options
Diffstat (limited to 'lib/libkvm/kvm_vnet.c')
-rw-r--r-- | lib/libkvm/kvm_vnet.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/libkvm/kvm_vnet.c b/lib/libkvm/kvm_vnet.c index 12ecafc074f82..d9bdf5591ef3d 100644 --- a/lib/libkvm/kvm_vnet.c +++ b/lib/libkvm/kvm_vnet.c @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include <net/vnet.h> -#include <nlist.h> #include <kvm.h> #include <limits.h> #include <stdlib.h> @@ -62,7 +61,7 @@ _kvm_vnet_selectpid(kvm_t *kd, pid_t pid) struct ucred cred; struct prison prison; struct vnet vnet; - struct nlist nl[] = { + struct kvm_nlist nl[] = { /* * Note: kvm_nlist strips the first '_' so add an extra one * here to __{start,stop}_set_vnet. @@ -90,6 +89,12 @@ _kvm_vnet_selectpid(kvm_t *kd, pid_t pid) lwpid_t dumptid; /* + * XXX: This only works for native kernels for now. + */ + if (!kvm_native(kd)) + return (-1); + + /* * Locate and cache locations of important symbols * using the internal version of _kvm_nlist, turning * off initialization to avoid recursion in case of @@ -204,7 +209,7 @@ _kvm_vnet_selectpid(kvm_t *kd, pid_t pid) /* * Check whether the vnet module has been initialized sucessfully - * or not, intialize it if permitted. + * or not, initialize it if permitted. */ int _kvm_vnet_initialized(kvm_t *kd, int intialize) @@ -222,8 +227,8 @@ _kvm_vnet_initialized(kvm_t *kd, int intialize) * Check whether the value is within the vnet symbol range and * only if so adjust the offset relative to the current base. */ -uintptr_t -_kvm_vnet_validaddr(kvm_t *kd, uintptr_t value) +kvaddr_t +_kvm_vnet_validaddr(kvm_t *kd, kvaddr_t value) { if (value == 0) |