svn commit: r196185 - head/lib/libkvm
Bjoern A. Zeeb
bz at FreeBSD.org
Thu Aug 13 14:59:05 UTC 2009
Author: bz
Date: Thu Aug 13 14:59:04 2009
New Revision: 196185
URL: http://svn.freebsd.org/changeset/base/196185
Log:
Rather than replicating the maths from the kernel, use the
value the kernel calculated directly as we already read it
with struct vnet. This will make kvm_vnet.c more resilent
in case of possible kernel changes.
Reviewed by: rwatson
Approved by: re (kib)
Modified:
head/lib/libkvm/kvm_vnet.c
Modified: head/lib/libkvm/kvm_vnet.c
==============================================================================
--- head/lib/libkvm/kvm_vnet.c Thu Aug 13 14:50:39 2009 (r196184)
+++ head/lib/libkvm/kvm_vnet.c Thu Aug 13 14:59:04 2009 (r196185)
@@ -195,7 +195,7 @@ _kvm_vnet_selectpid(kvm_t *kd, pid_t pid
kd->vnet_start = nl[NLIST_START_VNET].n_value;
kd->vnet_stop = nl[NLIST_STOP_VNET].n_value;
kd->vnet_current = (uintptr_t)prison.pr_vnet;
- kd->vnet_base = (uintptr_t)vnet.vnet_data_mem - kd->vnet_start;
+ kd->vnet_base = vnet.vnet_data_base;
return (0);
}
More information about the svn-src-all
mailing list