From 219bb53033fb8511ee74a8375a3bc672a727bdce Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 3 Oct 2018 10:12:37 +0000 Subject: [PATCH] unix: re-add vm.* sysctl strings on openbsd/amd64 These sysctl strings were lost in CL 114075 which updated openbsd/amd64 to OpenBSD 6.3. Re-add them by adding uvm/uvmexp.h to mksysctl_openbsd.pl. The defines for the VM_* constants were moved to this header in OpenBSD 6.3. Change-Id: If4291380d6d8235485d91c4442076dd03485bc2c Reviewed-on: https://go-review.googlesource.com/c/139277 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- unix/mksysctl_openbsd.pl | 1 + unix/zsysctl_openbsd_amd64.go | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/unix/mksysctl_openbsd.pl b/unix/mksysctl_openbsd.pl index 49f186f8..20632e14 100755 --- a/unix/mksysctl_openbsd.pl +++ b/unix/mksysctl_openbsd.pl @@ -32,6 +32,7 @@ my @headers = qw ( sys/sem.h sys/shm.h sys/vmmeter.h + uvm/uvmexp.h uvm/uvm_param.h uvm/uvm_swap_encrypt.h ddb/db_var.h diff --git a/unix/zsysctl_openbsd_amd64.go b/unix/zsysctl_openbsd_amd64.go index 90c95c2c..d014451c 100644 --- a/unix/zsysctl_openbsd_amd64.go +++ b/unix/zsysctl_openbsd_amd64.go @@ -254,4 +254,17 @@ var sysctlMib = []mibentry{ {"net.mpls.ttl", []_C_int{4, 33, 2}}, {"net.pflow.stats", []_C_int{4, 34, 1}}, {"net.pipex.enable", []_C_int{4, 35, 1}}, + {"vm.anonmin", []_C_int{2, 7}}, + {"vm.loadavg", []_C_int{2, 2}}, + {"vm.maxslp", []_C_int{2, 10}}, + {"vm.nkmempages", []_C_int{2, 6}}, + {"vm.psstrings", []_C_int{2, 3}}, + {"vm.swapencrypt.enable", []_C_int{2, 5, 0}}, + {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}}, + {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}}, + {"vm.uspace", []_C_int{2, 11}}, + {"vm.uvmexp", []_C_int{2, 4}}, + {"vm.vmmeter", []_C_int{2, 1}}, + {"vm.vnodemin", []_C_int{2, 9}}, + {"vm.vtextmin", []_C_int{2, 8}}, }