diff options
author | 1999-12-30 19:06:05 +0000 | |
---|---|---|
committer | 1999-12-30 19:06:05 +0000 | |
commit | 8fe7eaee76665262fd0b64bafd20ff9728f20e57 (patch) | |
tree | 9087c420cd98e4d3768facba8a85498d1ac8b073 | |
parent | document UVM_SWAP_ENCRYPT (diff) | |
download | wireguard-openbsd-8fe7eaee76665262fd0b64bafd20ff9728f20e57.tar.xz wireguard-openbsd-8fe7eaee76665262fd0b64bafd20ff9728f20e57.zip |
vm.swapencrypt for UVM
-rw-r--r-- | sbin/sysctl/Makefile | 6 | ||||
-rw-r--r-- | sbin/sysctl/sysctl.c | 11 | ||||
-rw-r--r-- | usr.sbin/sysctl/Makefile | 6 | ||||
-rw-r--r-- | usr.sbin/sysctl/sysctl.c | 11 |
4 files changed, 28 insertions, 6 deletions
diff --git a/sbin/sysctl/Makefile b/sbin/sysctl/Makefile index f1b0ef0f89d..023842ed679 100644 --- a/sbin/sysctl/Makefile +++ b/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/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 52975b7c0dd..33d2821843b 100644 --- a/sbin/sysctl/sysctl.c +++ b/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) { 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) { |