mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
Add support for optional sysctl arguments which is required to support sysctls that require more than the mib identifer args as returned from nametomib such as kern.proc.pid. Add SysctlUint64 which allows sysctls that return 64 bit ints to be queried. Add SysctlRaw which allows sysctls that return structs or other unsupported types to be queried. Change-Id: If0fa23935ee09496f2df210364d8988ccd0f3db6 Reviewed-on: https://go-review.googlesource.com/14955 Reviewed-by: Ian Lance Taylor <iant@golang.org>
21 lines
375 B
Go
21 lines
375 B
Go
// Copyright 2014 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build freebsd
|
|
|
|
package unix_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func TestSysctUint64(t *testing.T) {
|
|
_, err := unix.SysctlUint64("vm.max_kernel_address")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|