diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2001-04-13 01:41:38 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2001-04-13 01:41:38 +0000 |
commit | 5af2b89b71f9bb495e071539ea9548813c712c7c (patch) | |
tree | 65377bb89f66784221e2e531ac24b1c806f2a59f /sys | |
parent | 075631844ef9fab5c02b971ea60b26a6af904ff4 (diff) |
Make PROCFS compile again on non-UVM systems, deraadt@ ok
Diffstat (limited to 'sys')
-rw-r--r-- | sys/miscfs/procfs/procfs_linux.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/sys/miscfs/procfs/procfs_linux.c b/sys/miscfs/procfs/procfs_linux.c index 81428f4baa6..8d41775dd35 100644 --- a/sys/miscfs/procfs/procfs_linux.c +++ b/sys/miscfs/procfs/procfs_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_linux.c,v 1.1 2001/04/09 07:14:22 tholo Exp $ */ +/* $OpenBSD: procfs_linux.c,v 1.2 2001/04/13 01:41:37 miod Exp $ */ /* $NetBSD: procfs_linux.c,v 1.2.4.1 2001/03/30 21:48:11 he Exp $ */ /* @@ -46,7 +46,9 @@ #include <miscfs/procfs/procfs.h> #include <vm/vm.h> +#if defined(UVM) #include <uvm/uvm_extern.h> +#endif #define PGTOB(p) ((unsigned long)(p) << PAGE_SHIFT) #define PGTOKB(p) ((unsigned long)(p) << (PAGE_SHIFT - 10)) @@ -73,22 +75,41 @@ procfs_domeminfo(struct proc *curp, struct proc *p, struct pfsnode *pfs, "Cached: %8lu kB\n" "SwapTotal: %8lu kB\n" "SwapFree: %8lu kB\n", +#if defined(UVM) PGTOB(uvmexp.npages), PGTOB(uvmexp.npages - uvmexp.free), PGTOB(uvmexp.free), +#else + 0L, 0L, 0L, +#endif + 0L, 0L, + 0L, +#if defined(UVM) PGTOB(uvmexp.swpages), PGTOB(uvmexp.swpginuse), PGTOB(uvmexp.swpages - uvmexp.swpginuse), PGTOKB(uvmexp.npages), PGTOKB(uvmexp.free), +#else + 0L, + 0L, 0L, 0L, 0L, +#endif + 0L, + 0L, + 0L, +#if defined(UVM) PGTOKB(uvmexp.swpages), PGTOKB(uvmexp.swpages - uvmexp.swpginuse)); +#else + 0L, + 0L); +#endif if (len == 0) return 0; |