diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-26 03:44:17 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-26 03:44:17 +0000 |
commit | 8261e1939fa8e3e4035f9769b34d582828538d03 (patch) | |
tree | 7f5f9abf732603fccb96f134c5edc14db51eefda /sys/miscfs/kernfs/kernfs_vnops.c | |
parent | f5b9be5d1e51cdd1bf89d3ae5c5639246e5425db (diff) |
cnt is called uvmexp in uvm and the members have different names
Diffstat (limited to 'sys/miscfs/kernfs/kernfs_vnops.c')
-rw-r--r-- | sys/miscfs/kernfs/kernfs_vnops.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/miscfs/kernfs/kernfs_vnops.c b/sys/miscfs/kernfs/kernfs_vnops.c index 5f5f7acbe6e..ecddfa4871e 100644 --- a/sys/miscfs/kernfs/kernfs_vnops.c +++ b/sys/miscfs/kernfs/kernfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kernfs_vnops.c,v 1.15 1998/08/06 19:34:36 csapuntz Exp $ */ +/* $OpenBSD: kernfs_vnops.c,v 1.16 1999/02/26 03:44:16 art Exp $ */ /* $NetBSD: kernfs_vnops.c,v 1.43 1996/03/16 23:52:47 christos Exp $ */ /* @@ -46,7 +46,6 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/vmmeter.h> #include <sys/types.h> #include <sys/time.h> #include <sys/proc.h> @@ -61,6 +60,13 @@ #include <sys/msgbuf.h> #include <miscfs/kernfs/kernfs.h> +#if defined(UVM) +#include <vm/vm.h> +#include <uvm/uvm_extern.h> +#else +#include <sys/vmmeter.h> +#endif + #define KSTRING 256 /* Largest I/O available via this filesystem */ #define UIO_MX 32 @@ -99,7 +105,11 @@ struct kern_target kern_targets[] = { { DT_REG, N("ostype"), &ostype, KTT_STRING, VREG, READ_MODE }, { DT_REG, N("osrelease"), &osrelease, KTT_STRING, VREG, READ_MODE }, { DT_REG, N("osrev"), &osrev, KTT_INT, VREG, READ_MODE }, +#if defined(UVM) + { DT_REG, N("pagesize"), &uvmexp.pagesize, KTT_INT, VREG, READ_MODE }, +#else { DT_REG, N("pagesize"), &cnt.v_page_size, KTT_INT, VREG, READ_MODE }, +#endif { DT_REG, N("physmem"), &physmem, KTT_INT, VREG, READ_MODE }, { DT_REG, N("posix"), &posix, KTT_INT, VREG, READ_MODE }, #if 0 @@ -291,7 +301,11 @@ kernfs_xread(kt, off, bufp, len) break; case KTT_USERMEM: +#if defined(UVM) + sprintf(*bufp, "%u\n", physmem - uvmexp.wired); +#else sprintf(*bufp, "%u\n", physmem - cnt.v_wire_count); +#endif break; #ifdef IPSEC case KTT_IPSECSPI: |