summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1999-12-30 19:06:07 +0000
committerNiels Provos <provos@cvs.openbsd.org>1999-12-30 19:06:07 +0000
commit27b8f974a91bc095a64cdd22a440c2afb67f0479 (patch)
treeb228e5c5167d2be330f0eca6e49844bd489a19a2 /usr.sbin
parent4fb18ee53f6747b1959ec13f3ee6077a597886e3 (diff)
vm.swapencrypt for UVM
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sysctl/Makefile6
-rw-r--r--usr.sbin/sysctl/sysctl.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/usr.sbin/sysctl/Makefile b/usr.sbin/sysctl/Makefile
index f1b0ef0f89d..023842ed679 100644
--- a/usr.sbin/sysctl/Makefile
+++ b/usr.sbin/sysctl/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.4 1999/12/10 10:12:56 itojun Exp $
+# $OpenBSD: Makefile,v 1.5 1999/12/30 19:06:05 provos Exp $
PROG= sysctl
MAN= sysctl.8
@@ -6,3 +6,7 @@ MAN= sysctl.8
CPPFLAGS+= -DINET6
.include <bsd.prog.mk>
+
+.if (${UVM} == "yes")
+CFLAGS+=-DUVM
+.endif
diff --git a/usr.sbin/sysctl/sysctl.c b/usr.sbin/sysctl/sysctl.c
index 52975b7c0dd..33d2821843b 100644
--- a/usr.sbin/sysctl/sysctl.c
+++ b/usr.sbin/sysctl/sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.c,v 1.43 1999/12/10 10:12:56 itojun Exp $ */
+/* $OpenBSD: sysctl.c,v 1.44 1999/12/30 19:06:06 provos Exp $ */
/* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)sysctl.c 8.5 (Berkeley) 5/9/95";
#else
-static char *rcsid = "$OpenBSD: sysctl.c,v 1.43 1999/12/10 10:12:56 itojun Exp $";
+static char *rcsid = "$OpenBSD: sysctl.c,v 1.44 1999/12/30 19:06:06 provos Exp $";
#endif
#endif /* not lint */
@@ -377,10 +377,17 @@ parse(string, flags)
(void)printf("%p\n", _ps.val);
return;
}
+#ifdef UVM
+ if (mib[1] != VM_SWAPENCRYPT) {
+#endif
if (flags == 0)
return;
warnx("use vmstat or systat to view %s information", string);
return;
+#ifdef UVM
+ }
+#endif
+ break;
case CTL_NET:
if (mib[1] == PF_INET) {