summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/miscfs/procfs/procfs_linux.c23
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;